home *** CD-ROM | disk | FTP | other *** search
/ Network Supervisor's Toolkit / Network Supervisor's Toolkit.iso / editors / aurora / aml.doc < prev    next >
Text File  |  1996-07-10  |  165KB  |  4,459 lines

  1.  
  2.  
  3.  
  4.   T h e   A u r o r a   M a c r o   L a n g u a g e   G u i d e
  5.   ─────────────────────────────────────────────────────────────
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.   The Aurora Macro Language Guide
  16.  
  17.   Version 1.20, January 1994
  18.  
  19.   Copyright (c) 1993-1994 Aurora Terra, Inc.
  20.  
  21.   ALL RIGHTS RESERVED.
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.   Aurora Terra, Inc.
  29.   P.O. Box 34275
  30.   Bethesda, MD. 20827-0275  USA
  31.   301-468-2255  (Voice)
  32.   301-230-1214  (BBS 14,400 V.32bis)
  33.  
  34.  
  35.  
  36.   The Aurora Editor is Copyright (c) 1993-1994 by Aurora Terra, Inc.
  37.   The Aurora Editor/386 is Copyright (c) 1993-1994 by Aurora Terra, Inc.
  38.   The Aurora Macro Language is Copyright (c) 1993-1994 by Aurora Terra, Inc.
  39.  
  40.   No parts of The Aurora Editor software or this document may be copied
  41.   in part or in whole, except as provided by the License in the
  42.   following pages.
  43.  
  44.   This version of The Aurora Editor is NOT public domain or free
  45.   software, but is distributed as "shareware" for evaluation purposes
  46.   only. Please refer to the license information in the following pages.
  47.  
  48.   The Aurora Editor is a trademark of Aurora Terra, Inc.
  49.   The Aurora Editor/386 is a trademark of Aurora Terra, Inc.
  50.   The Aurora Macro Language is a trademark of Aurora Terra, Inc.
  51.  
  52.   Other product names found throughout this document are trademarks of
  53.   various companies.
  54.                                                   Table of Contents   ii
  55.  
  56.  
  57.   Table of Contents
  58.   ─────────────────
  59.  
  60.   I-1  Introduction..................................................iii
  61.  
  62.   1-1  The Aurora Macro Language.......................................1
  63.   1-2  Macro Language Sentences........................................2
  64.   1-3  Comments........................................................3
  65.   1-4  Evaluating Arguments............................................3
  66.   1-5  Function Call Series............................................4
  67.   1-6  Variables.......................................................5
  68.   1-7  Native Functions................................................6
  69.   1-8  Defining Functions..............................................8
  70.   1-9  Control Functions..............................................10
  71.   1-10  Logical Functions.............................................11
  72.   1-11  Objects.......................................................12
  73.   1-12  Handling Events...............................................14
  74.   1-13  The Interpreter and Compiler..................................16
  75.  
  76.   2-1  Native Function List...........................................17
  77.  
  78.   3-1  Native Functions - In Detail...................................24
  79.   3-2  Definition Functions...........................................25
  80.   3-3  Conditional Functions..........................................26
  81.   3-4  Logical Functions..............................................27
  82.   3-5  Bitwise Logical Functions......................................27
  83.   3-6  Control Functions..............................................28
  84.   3-7  Arithmetic Functions...........................................28
  85.   3-8  String Functions...............................................29
  86.   3-9  Evaluation and Compilation Functions...........................32
  87.   3-10  Miscellaneous Functions.......................................33
  88.   3-11  Object Functions..............................................34
  89.   3-12  Disk Functions................................................36
  90.   3-13  System Functions..............................................41
  91.   3-14  Timer Functions...............................................44
  92.   3-15  Keyboard Functions............................................45
  93.   3-16  Mouse Functions...............................................47
  94.   3-17  Queue Functions...............................................48
  95.   3-18  Video Functions...............................................50
  96.   3-19  Text Buffer Functions.........................................53
  97.   3-20  Mark Functions................................................61
  98.   3-21  Window Functions..............................................70
  99.  
  100.   A-1  The Aurora Macro Language and The Aurora Editor................85
  101.  
  102.                                                        Introduction  iii
  103.  
  104.  
  105.   Warranty Disclaimer
  106.   ───────────────────
  107.  
  108.   Aurora Terra makes no warranty of any kind, either express or implied,
  109.   including but not limited to implied warranties of merchantability and
  110.   fitness for a particular purpose, with respect to this software and
  111.   accompanying documentation.
  112.  
  113.   IN NO EVENT SHALL AURORA TERRA BE LIABLE FOR ANY DAMAGES RESULTING
  114.   FROM THE USE OF THIS SOFTWARE, INCLUDING BUT NOT LIMITED TO, DAMAGES
  115.   FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS
  116.   INFORMATION, INCIDENTAL OR CONSEQUENTIAL DAMAGES, OR OTHER FINANCIAL
  117.   LOSS ARISING OUT OF THE USE OF OR INABILITY TO USE THIS PROGRAM, EVEN
  118.   IF AURORA TERRA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
  119.  
  120.  
  121.   I-1  Introduction
  122.   ─────────────────
  123.  
  124.   This is The Aurora Macro Language Guide. It describes all of the
  125.   features and native functions of The Aurora Macro Language. Prior
  126.   knowledge of another programming language such as C or Pascal may be
  127.   helpful in understanding this document.
  128.  
  129.   For information on how to install, configure, and use The Aurora
  130.   Editor, see "The Aurora Editor Users Guide".
  131.  
  132.   It is not necessary to understand all the details of the Aurora Macro
  133.   Language to use The Aurora Editor. However, experienced users may find
  134.   the macro language to be very useful for writing new editor functions,
  135.   or in configuring detailed aspects of the editor. Knowledge of the
  136.   macro language may also help you to better understand the keyboard
  137.   definition (AKBD.A), menu definition (AMEN.A), configuration (ACFG.A),
  138.   and text translation definition (ATRN.A) files for The Aurora Editor.
  139.  
  140.   This document describes macro language "native" functions which are
  141.   built in to The Aurora Macro Language. The Aurora Editor also uses
  142.   many "library functions" which are built up from native functions and
  143.   are contained in the file ALIB.X. Library functions are documented in
  144.   The Aurora Editor Users Guide (A.DOC), and summarized in The Aurora
  145.   Editor Quick Reference (AREF.DOC).
  146.                                            The Aurora Macro Language   1
  147.  
  148.  
  149.   1-1  The Aurora Macro Language
  150.   ──────────────────────────────
  151.  
  152.   The Aurora Macro Language is a flexible, interpreted language, which
  153.   is simple in syntax, yet rich in function. A primary design goal was
  154.   to keep the macro language interpreter and compiler small enough so
  155.   they would fit in the same .EXE file as the rest of the editor. This
  156.   allows the editor to execute macro language expressions interactively
  157.   within an editor session, and greatly enhances the overall flexibility
  158.   of the editor. Both the interpreter and compiler are accessible as
  159.   native functions within the macro language itself.
  160.  
  161.   The Aurora Macro Language may appear somewhat similar to LISP in
  162.   syntax, but the resemblance ends there. The Aurora Macro Language is
  163.   primarily a "string-oriented" language with "the string" as the only
  164.   visible data type. All functions and data are viewed as character
  165.   strings and can be manipulated as character strings. Since there is
  166.   only one data type, no variable declarations are required.
  167.  
  168.   The Aurora Macro language is also "object-oriented". Functions and
  169.   data can be encapsulated into "objects", and object hierarchies can be
  170.   created with "inheritance" and "multiple inheritance". Inheritance
  171.   hierarchies can also be dynamically altered.
  172.  
  173.  
  174.   1-2  Macro Language Sentences
  175.   ─────────────────────────────
  176.  
  177.   Each program in written in The Aurora Macro Language is really just a
  178.   string composed of a series of macro language "sentences". Each
  179.   sentence is composed of a series of "words" separated by spaces, and
  180.   each sentence is usually terminated by a period. The first word in
  181.   each sentence is the name of a function to execute, and any words that
  182.   follow are arguments to the function. For example:
  183.  
  184.     abc 1 2 3.
  185.     xyz "foo" "bar" x.
  186.  
  187.   In the above example, two sentences are evaluated. The arguments "1",
  188.   "2", and "3" are passed to the function "abc", and the strings "foo",
  189.   "bar", and the variable "x" are passed to the function "xyz".
  190.  
  191.   Function names can be up to 255 characters in length and may contain
  192.   any characters. You can use "native" (built-in) functions, or define
  193.   your own functions.
  194.                                             Macro Language Sentences   2
  195.  
  196.  
  197.   A function can have up to 100 arguments, or no arguments at all.
  198.   Arguments to a function may be integers from -2147483647 to
  199.   +2147483647, strings enclosed in double quotes, variables, or even
  200.   other sentences.
  201.  
  202.   Hex integers can be specified by adding an "h" at the end of the
  203.   integer. A leading zero is required if the hex integer begins with an
  204.   alphabetic character. For example, "1h", "3CH", and "0FFFFh" are valid
  205.   hex integers.
  206.  
  207.   Strings may be up to 16000 characters in length, and variable names
  208.   may be up to 255 characters in length.
  209.  
  210.   If an argument to a function is another sentence, it must be enclosed
  211.   in parentheses:
  212.  
  213.     abc 1 (xyz "foo" "bar" x) 3.
  214.  
  215.   In the above example, the arguments "foo", "bar", and the value of the
  216.   variable "x" are passed to the function "xyz". The result of
  217.   evaluating "xyz" becomes the second argument to the function "abc".
  218.   Note that a terminating period is not required for the sentence
  219.   beginning with "xyz" since it is already terminated by a right
  220.   parenthesis.
  221.  
  222.   An argument may also be composed of more than one sentence. In this
  223.   case, the value of the argument is the value of the last sentence:
  224.  
  225.     abc 1 (alpha "foo" "bar". beta. gamma 5 6) 3.
  226.  
  227.   In the above example, the value of the second argument to "abc" is the
  228.   result of evaluating the sentence "gamma 5 6".
  229.  
  230.   A sentence may be spread out over more than one line and spaces may be
  231.   inserted anywhere in the sentence, as long as the words in the
  232.   sentence are not split. The above example could also be written as:
  233.  
  234.     abc 1 (
  235.       alpha "foo" "bar".
  236.       beta.
  237.       gamma 5 6
  238.     )  3.
  239.                                                             Comments   3
  240.  
  241.  
  242.   1-3  Comments
  243.   ─────────────
  244.  
  245.   Single line and multi-line comments can be inserted anywhere within a
  246.   macro language program. In a single line comment, any characters
  247.   located between two slashes (//) and the end of the line are ignored
  248.   (except if they are contained within a double quoted string). For
  249.   example:
  250.  
  251.     abc 1 2 3.           // this is a single line comment
  252.     xyz "foo" "bar" x.   // this is another single line comment
  253.  
  254.   Multi-line comments can span any number of lines. For multi-line
  255.   comments, any characters located between the comment delimiters "/*"
  256.   and "*/" are ignored. For example:
  257.  
  258.     abc 1 2 3.
  259.        /* this is a
  260.           multi-line comment */
  261.     xyz "foo" "bar" x.
  262.  
  263.  
  264.   1-4  Evaluating Arguments
  265.   ─────────────────────────
  266.  
  267.   When the interpreter evaluates a macro language sentence, each
  268.   argument in the sentence is evaluated from first to last. The
  269.   resulting values for each argument are passed to the function (the
  270.   first "word" in the sentence) and the function is evaluated. For
  271.   example:
  272.  
  273.     abc 1 "foo" x (xyz 5 6).
  274.  
  275.   In the above macro language sentence, the first argument evaluates
  276.   to "1", the second argument evaluates to "foo", the third argument
  277.   evaluates to value of the variable "x", and the fourth argument
  278.   evaluates to the value of the sentence "xyz 5 6".
  279.  
  280.   You can prevent the evaluation of an argument by prefixing it with
  281.   the "literal" operator (%). For example:
  282.  
  283.     abc 1 "foo" %x (xyz 5 6).
  284.  
  285.   The difference between the above example and the previous example is
  286.   that the third argument is now the string "x", not the variable "x" (x
  287.   is not evaluated). As you can see from the above example, using the
  288.   literal operator (%) can also be a convenient way to specify string
  289.   arguments (that contain no blanks), without enclosing the string in
  290.   double quotes.
  291.                                                 Evaluating Arguments   4
  292.  
  293.  
  294.   If all of the function arguments are prefixed with the literal (%)
  295.   operator, you can remove the literal operator from the arguments and
  296.   attach it to the end of the function name. For example:
  297.  
  298.     xyz %foo %bar %x.
  299.  
  300.       is equivalent to:
  301.  
  302.     xyz% foo bar x.
  303.  
  304.   In both the examples above, the strings "foo", "bar", and "x" are
  305.   passed to the function "xyz". Note that some native functions in the
  306.   macro language (such as the "fun" function) do not normally evaluate
  307.   their arguments. These functions automatically assume that all
  308.   arguments are "literal", without having to use the literal operator.
  309.  
  310.   The inverse of the literal operator is the "evaluation" operator (@).
  311.   This operator forces evaluation of an argument, even when the function
  312.   name is suffixed with the literal operator (%). For example:
  313.  
  314.     xyz% foo bar @x.
  315.  
  316.   In the example above, the third argument evaluates to the value of the
  317.   variable "x", not the string "x". The first and second arguments still
  318.   evaluate to the strings "foo" and "bar".
  319.  
  320.   Both the literal operator (%) and the evaluation operator (@) can be
  321.   used to specify "null" arguments (strings of zero length) when they
  322.   are specified by themselves. For example:
  323.  
  324.     xyz @ % %foobar.
  325.  
  326.   In the example above, the first and second arguments are "null"
  327.   strings, and the third argument is the string "foobar".
  328.  
  329.  
  330.   1-5  Function Call Series
  331.   ─────────────────────────
  332.  
  333.   In many programming languages, the situation often arises where the
  334.   same function is called many times in series, each time with different
  335.   arguments. The Aurora Macro Language provides a convenient way to
  336.   handle this situation: just specify the function name once and then
  337.   specify each set of arguments separated by commas. For example:
  338.  
  339.     abc 1 2 3.
  340.     abc 4 5 6.
  341.     abc 7 8 9.
  342.                                                 Function Call Series   5
  343.  
  344.  
  345.       is equivalent to:
  346.  
  347.     abc 1 2 3, 4 5 6, 7 8 9.
  348.  
  349.  
  350.   1-6  Variables
  351.   ──────────────
  352.  
  353.   The Aurora Macro Language allows you to assign values to variables
  354.   which are local to a function definition, or that reside in a macro
  355.   language "object" (see the "Defining Functions" and "Objects" sections
  356.   below for a description of function definitions and objects).
  357.  
  358.   Variables local to a function are referred to as "local" variables,
  359.   whereas variables that reside in an object are referred to as "object"
  360.   variables. There is no need to define either of these variables. Both
  361.   variable types are defined the first time a variable assignment is
  362.   made.
  363.  
  364.   The native function "=" is used to assign a value to a local variable.
  365.   For example:
  366.  
  367.     = %x 3.    // local variable x is assigned a value of "3"
  368.  
  369.   Note that in the example above, the argument "x" must be preceded by
  370.   the literal operator (%), otherwise the VALUE of the variable "x"
  371.   (instead of the variable "x") would be assigned the value "3".
  372.   The above example could also have been written as:
  373.  
  374.     = "x" 3.   // local variable x is assigned a value of "3"
  375.  
  376.   Local variable assignments exist until they are re-assigned or until
  377.   the function in which they are contained returns.
  378.  
  379.   To assign a value to a "object" variable, use the "set" native
  380.   function. The assignment will be made in the "default" object, unless
  381.   an object name is explicitly specified between two slash (/)
  382.   characters. For example:
  383.  
  384.     set %x 3.          // object variable x in the "default" object is
  385.                        //   assigned the value "3"
  386.     set %/aurora/x 3.  // object variable x in the object "aurora" is
  387.                        //   assigned the value "3"
  388.  
  389.   Object variable assignments exist until they are re-assigned or until
  390.   the object in which they are located is destroyed. Since object
  391.   variable assignments can remain in effect across function calls, they
  392.   are considered to be "global" variables.
  393.                                                            Variables   6
  394.  
  395.  
  396.   These are more examples of variable assignments:
  397.  
  398.     =% x foobar.            // assigns "foobar" to local variable x
  399.     = %i x.                 // assigns the value of x to local var i
  400.     = %i (abc 3 x).         // assigns the value of the expression
  401.                             //   "abc 3 x" to local variable i
  402.  
  403.     set% x foobar.          // assigns "foobar" to object variable x
  404.                             //   (in the default object)
  405.     set %x y.               // assigns the value of y to object var x
  406.     set %x (xyz).           // assigns the value of the function
  407.                             //   "xyz" to object variable x
  408.     set (xyz) %x.           // assigns "x" to the variable name which
  409.                             //   is the value of function "xyz"
  410.     set %/aurora/x y.       // assigns the value of y to object var x
  411.                             //   in the object "aurora"
  412.  
  413.   When a reference is made to a variable which has never been assigned a
  414.   value (a "non-existent" variable), the value of that variable is
  415.   always the "null" string (a string of length zero).
  416.  
  417.   Note that when variables are referenced, local variables have higher
  418.   precedence than object variables. For example:
  419.  
  420.     = %x 4.
  421.     set %x 5.
  422.     abc x.
  423.  
  424.   In the example above, the value "4" will be passed to the function
  425.   "abc". The argument "x" to function "abc" refers to the local variable
  426.   "x", not the object variable "x".
  427.  
  428.  
  429.   1-7  Native Functions
  430.   ─────────────────────
  431.  
  432.   The Aurora Macro Language has hundreds "native" functions, which are
  433.   pre-defined or "built-in". A few commonly used native functions may be
  434.   used in later examples and are worth mentioning briefly here:
  435.  
  436.  
  437.   Conditional:
  438.  
  439.     eq     returns "1" if all of its arguments are equal, otherwise
  440.            it returns the null string.
  441.  
  442.     ne     returns "1" if all of its arguments are not equal,
  443.            otherwise it returns the null string.
  444.                                                     Native Functions   7
  445.  
  446.  
  447.     >      returns "1" if each of its arguments is numerically
  448.            greater than the argument which follows, otherwise it
  449.            returns the null string.
  450.  
  451.     <      returns "1" if each of its arguments is numerically less
  452.            than the argument which follows, otherwise it returns the
  453.            null string.
  454.  
  455.  
  456.   Arithmetic:
  457.  
  458.     +      returns the numeric sum of all of its arguments.
  459.  
  460.     -      if only one argument is specified, it returns the numeric
  461.            negative of the argument, otherwise it returns the value of
  462.            the first argument minus all the arguments which follow.
  463.  
  464.     *      returns the numeric product of all of its arguments.
  465.  
  466.     /      returns the value of the first argument divided by all the
  467.            arguments which follow.
  468.  
  469.  
  470.   String:
  471.  
  472.     cat    concatenates all of its arguments and returns the result.
  473.  
  474.     sub    returns the substring of its first argument taken from the
  475.            position of the second argument and extending for the
  476.            length of the third argument.
  477.  
  478.     fin    searches for the second argument inside the first argument
  479.            and returns the position if found, otherwise it returns
  480.            null.
  481.  
  482.  
  483.   Other:
  484.  
  485.     beep   beeps the PC speaker at the frequency of the first argument
  486.            for the duration of the second argument.
  487.  
  488.  
  489.   Library:
  490.  
  491.     say    displays a message on the window title bar (this function is
  492.            documented in "The Aurora Editor Users Guide").
  493.                                                   Defining Functions   8
  494.  
  495.  
  496.   1-8  Defining Functions
  497.   ───────────────────────
  498.  
  499.   The Aurora Macro Language has many native functions which are
  500.   pre-defined when a macro language program is evaluated. No further
  501.   definitions are required to use native functions.
  502.  
  503.   To create your own functions, you must first define them with the
  504.   native function "fun". For example:
  505.  
  506.     fun  hello (
  507.       say "hello".
  508.       beep 300 300.
  509.     ).
  510.  
  511.   In the example above, the function "hello" is defined. Note that the
  512.   native function "fun" automatically assumes that both its arguments
  513.   are literal. The literal operator (%) is not required. Also note that
  514.   the definition of "hello" is a macro language "sentence", and
  515.   therefore requires a terminating period.
  516.  
  517.   Arguments passed to user-defined functions can be accessed with the
  518.   the "arg" and "qarg" native functions. The "arg" native function maps
  519.   any arguments passed to the function to local variables within the
  520.   function. For example:
  521.  
  522.     fun  hello (
  523.       arg s f.
  524.       say s.
  525.       beep f 300.
  526.     ).
  527.  
  528.   In the example above, the local variables "s" and "f" are mapped to
  529.   the first two arguments passed to "hello". The variables "s" and "f"
  530.   can then be used in any expression within the function. This does not
  531.   mean that exactly two arguments must always be passed to "hello". Any
  532.   number of arguments may be passed to any function. If only one
  533.   argument were passed to the function "hello" in the example above, the
  534.   value of the local variable "f" would be the null string. If three
  535.   arguments were passed to "hello", the third argument would not be
  536.   accessible as a local variable.
  537.  
  538.   The "qarg" native function allows you access function arguments by the
  539.   order in which they where passed. The "qarg" function takes one
  540.   argument: the relative position of the argument being passed to the
  541.   function. The following example is equivalent to the previous example:
  542.                                                   Defining Functions   9
  543.  
  544.  
  545.     fun  hello (
  546.       say (qarg 1).
  547.       beep (qarg 2) 300.
  548.     ).
  549.  
  550.   Note that "qarg 0" will return total number of arguments passed to the
  551.   function.
  552.  
  553.   Remember that you can call any function with any number of arguments
  554.   at any time. The number of arguments is always determined by the
  555.   function call, not the function.
  556.  
  557.   It is also possible to call non-existent or undefined functions.
  558.   Calling an undefined function will always return the value of the last
  559.   argument passed to the undefined function. Calling a defined function
  560.   returns the value of the last sentence in the function. For example:
  561.  
  562.     fun  abc (
  563.       arg x y.
  564.       dothis 1 x.
  565.       dothat 2 y.
  566.       hello x y.
  567.     ).
  568.  
  569.     abc "hello world" 300.
  570.  
  571.   In the example above, the function "abc" is defined and then called
  572.   with the arguments "hello world" and "300". The return value of the
  573.   call to "abc" would be the result of evaluating the last sentence
  574.   "hello x y". If the function "hello" is not defined, the return value
  575.   of "abc" would be "300".
  576.  
  577.   It is also possible to call the "null" function by using the literal
  578.   operator (%) or the evaluation operator (@) as the function name.
  579.   Since the null function is not defined, it always returns the value of
  580.   the last argument passed to it. This can be useful for returning
  581.   variables or constant values from a function. For example:
  582.  
  583.     fun  xyz (
  584.       = %x 3.
  585.       % x.
  586.     ).
  587.  
  588.     set %y (xyz).
  589.  
  590.   In the example above, the function "xyz" is defined and then called
  591.   with no arguments. The function "xyz" assigns "3" to the local
  592.   variable "x" and then returns the value of "x" (3). The object
  593.   variable "y" is then assigned a value of "3".
  594.                                                   Control Functions   10
  595.  
  596.  
  597.   1-9  Control Functions
  598.   ──────────────────────
  599.  
  600.   There are several native functions which can be used to control the
  601.   flow of execution of a macro language program. Note that no special
  602.   syntax is required to use control functions. They are treated just
  603.   like any other function. The difference between control functions and
  604.   other functions is that not all of the arguments to a control function
  605.   are always evaluated.
  606.  
  607.   Perhaps the most commonly-used control function is the "if" function.
  608.   The first argument of the "if" function is always evaluated. If the
  609.   first argument does not evaluate to zero or null, then the second
  610.   argument is evaluated, otherwise the third argument is evaluated. The
  611.   return value of the "if" function is the value of the second or third
  612.   argument, depending on which one is evaluated. For example:
  613.  
  614.     if x (abc) (xyz).
  615.  
  616.   In the example above, if the variable x is "0" or null, then the
  617.   function "xyz" is evaluated, otherwise the function "abc" is
  618.   evaluated.
  619.  
  620.   "Conditional" native functions such as "eq" are often used with the
  621.   "if" function. For example:
  622.  
  623.     if (eq s "yes") (
  624.       = %x 1.
  625.       beep 700 200.
  626.     )(
  627.       = %x 2.
  628.       beep 200 200.
  629.     ).
  630.  
  631.   In the example above, if the variable "s" is equal to "yes", the value
  632.   "1" is assigned to local variable "x" and a high-pitched beep is
  633.   heard. If "s" is not equal to "yes", the value "2" is assigned to "x"
  634.   and low-pitched beep is heard.
  635.  
  636.   The "if" function can be used anywhere that any other function can be
  637.   used. For example:
  638.  
  639.     = %x (if (eq s "no") "nope" "yup").
  640.  
  641.   In the example above, if the variable "s" is equal to "no", then the
  642.   value "nope" is assigned to "x", otherwise the value "yup" is assigned
  643.   to "x".
  644.                                                   Control Functions   11
  645.  
  646.  
  647.   The "while" and "dowhile" functions are control functions which can be
  648.   used to perform looping operations. The "while" function will evaluate
  649.   its first and second arguments repeatedly while its first argument
  650.   is "true" (non-null and non-zero). For example:
  651.  
  652.     = %x 1000.
  653.     while x (
  654.       beep x 200.
  655.       = %x (- x 100).
  656.     ).
  657.  
  658.   In the example above, the PC speaker will beep 10 times, each time
  659.   with decreasing frequency.
  660.  
  661.   The "dowhile" function is similar to the "while" function, except that
  662.   the first and second arguments are evaluated repeatedly until the
  663.   second argument evaluates to "false" (null or zero). The following
  664.   example is equivalent to the previous example:
  665.  
  666.     = %x 1000.
  667.     dowhile (
  668.       beep x 200.
  669.       = %x (- x 100).
  670.     ) x.
  671.  
  672.  
  673.   1-10  Logical Functions
  674.   ───────────────────────
  675.  
  676.   The logical functions test the logical values of their arguments to
  677.   return either "1" (true) or null (false). Like the control functions
  678.   (see above), not all of the arguments to a logical function are always
  679.   evaluated.
  680.  
  681.   The following logical functions are available:
  682.  
  683.     and    returns "1" if all its arguments evaluate to "true"
  684.            (non-null and non-zero). If an argument does not evaluate
  685.            to "true", then no more arguments are evaluated.
  686.  
  687.     or     returns "1" if at least one of its arguments evaluate to
  688.            "true". No more arguments are evaluated after the first
  689.            "true" argument is found.
  690.  
  691.     !      returns "1" if all of its arguments evaluate to "false",
  692.            otherwise it returns null. All arguments are evaluated.
  693.  
  694.   The following example demonstrates the use of logical functions:
  695.                                                   Logical Functions   12
  696.  
  697.  
  698.     if (and ((eq x 3) (or y z))) (beep 400 400).
  699.  
  700.   In the example above, a beep is heard only if the variable "x" is "3",
  701.   and at least one of the variables "y" or "z" are true (non-null and
  702.   non-zero).
  703.  
  704.  
  705.  
  706.   1-11  Objects
  707.   ─────────────
  708.  
  709.   In The Aurora Macro Language, an object is a user-defined group of
  710.   function definitions and variable assignments. Each object has a name
  711.   (up to 255 characters). By default, all object variables and functions
  712.   are placed in the pre-defined object "a". The object "a" is
  713.   automatically created by the interpreter whenever a macro language
  714.   program is evaluated.
  715.  
  716.   To create a new object, you must use the native function "objnew". For
  717.   example:
  718.  
  719.     objnew% aurora 17.
  720.  
  721.   In the example above, a new object called "aurora" will be created.
  722.   The object "aurora" will have an estimated size of 17 function
  723.   definitions and/or variable settings (this size estimate is used by
  724.   the interpreter to create an optimized internal index).
  725.  
  726.   To add functions or variable assignments to the object you created,
  727.   use the "obj" native function:
  728.  
  729.     obj  aurora  (
  730.  
  731.       set %x 1.        // assign 1 to variable x in object "aurora"
  732.       set %y 2.        // assign 2 to variable y in object "aurora"
  733.  
  734.       fun  abc (       // define function "abc" in object "aurora"
  735.         say "abc".
  736.       ).
  737.  
  738.       fun  xyz (       // define function "xyz" in object "aurora"
  739.         say "xyz".
  740.       ).
  741.  
  742.     ).
  743.  
  744.   In the example above, any variable assignments or function definitions
  745.   within the scope of the "obj" sentence will be added to the object
  746.   "aurora" (the default object is "aurora" inside the obj sentence).
  747.   Variable assignments or functions definitions made outside the scope
  748.   of the "obj" sentence would be added to the default object "a".
  749.                                                             Objects   13
  750.  
  751.  
  752.   Like the "fun" native function, the "obj" native function assumes that
  753.   all its arguments are literal. The literal operator (%) is not
  754.   required.
  755.  
  756.   An object can "inherit" the functions and variable assignments of
  757.   other objects by grouping them together in "inheritance paths". When a
  758.   reference to function or variable is made, and it is not found in the
  759.   current "default" object, then the object's inheritance path is
  760.   searched until the reference is found. This mechanism works similar to
  761.   the way the DOS "PATH" environment variable is searched when executing
  762.   DOS programs, except that it is also possible to create hierarchal
  763.   search paths.
  764.  
  765.   The searching of inheritance paths is performed automatically by the
  766.   macro language interpreter and is transparent to any function call or
  767.   variable reference. Note that "native" functions are always accessible
  768.   from within any object.
  769.  
  770.   The inheritance path or "ancestry" of an object can be defined when
  771.   the object is created with the "objnew" command. For example:
  772.  
  773.     objnew% aurora 17 obj1 obj2.
  774.  
  775.   In the example above, the object "aurora" is created and assigned the
  776.   inheritance path "obj1 obj2". When a reference to a function or
  777.   variable in the object "aurora" fails, the objects "obj1" and "obj2"
  778.   are searched for the reference (in the order they are specified). In
  779.   this way the object "aurora" is said to "inherit" the functions and
  780.   object variables of "obj1" and "obj2". Using inheritance, the object
  781.   "aurora" appears to contain all of the functions and variables of
  782.   "obj1" and "obj2". Note that the objects "obj1" and "obj2" may also
  783.   have inheritance paths. In this way, hierarchal inheritance paths can
  784.   be established.
  785.  
  786.   Consider the following example:
  787.  
  788.     objnew% obj1 1, obj2 1.
  789.     objnew% aurora 3 obj1 obj2.
  790.  
  791.     obj  obj1 (
  792.       set% s hello.
  793.     ).
  794.  
  795.     obj  obj2 (
  796.       fun  hello (
  797.         arg x y.
  798.         say x.
  799.         beep y 300.
  800.       ).
  801.     ).
  802.                                                             Objects   14
  803.  
  804.  
  805.     obj  aurora (
  806.       hello s 400.
  807.     ).
  808.  
  809.   In the example above, the function "hello" is called with the
  810.   arguments "s" and "400". Since there is no function "hello" in the
  811.   object "aurora", the inheritance path for "aurora" is searched and
  812.   "hello" is found in "obj2". Also, since object "aurora" has no
  813.   variable "s", the inheritance path is searched and "s" is found in
  814.   "obj1".
  815.  
  816.   Object inheritance paths can also be changed dynamically via the
  817.   "objpar" native function. For example:
  818.  
  819.     objpar% aurora obj3 obj4.
  820.  
  821.   In the example above, the inheritance path for the object "aurora" is
  822.   changed to "obj3 obj4".
  823.  
  824.  
  825.   Functions and variables in other objects can be referenced directly by
  826.   specifying the object name between slash (/) characters immediately
  827.   before the function name or variable name. For example:
  828.  
  829.     abc 1 2 /aurora/x.     // variable x in object "aurora"
  830.  
  831.     /obj2/xyz "foobar".    // function "xyz" in object "obj2"
  832.  
  833.  
  834.  
  835.   1-12  Handling Events
  836.   ─────────────────────
  837.  
  838.   Event Handling is a built-in feature of The Aurora Macro Language.
  839.   When an external or internal event occurs (a keystroke, mouse event,
  840.   or timer event), it is posted to the interpreter event queue. The next
  841.   time the interpreter is idle, it will read the event from the event
  842.   queue, translate it into a pre-defined function name (with arguments
  843.   if applicable), and attempt to call the function. If the user has
  844.   properly defined a function with the same pre-defined function name,
  845.   the user's function will be called automatically by the interpreter.
  846.  
  847.   When the interpreter calls the user's function, it will always look
  848.   for the function in the current "event object" (the event object is
  849.   not necessarily the same object as the default object). Only one
  850.   object can be the event object at any given time. When a macro
  851.   language program is initially evaluated, the event object is the
  852.   default object "a", but that can be changed at any time by the program
  853.   (see below).
  854.                                                     Handling Events   15
  855.  
  856.  
  857.   If the function is not found in the event object, the interpreter will
  858.   search the event object's inheritance path for the event function. In
  859.   this way, an object inherits the event-handling capabilities of its
  860.   ancestor objects.
  861.  
  862.   It is often useful to change the entire behavior of the keyboard and
  863.   mouse simply by making another object the event object. For example,
  864.   when you switch from a File Manager window to an Edit window, The
  865.   Aurora Editor simply changes current event object, and a whole
  866.   different set of keyboard functions and mouse functions become active.
  867.  
  868.   To change the current event object, use the native function "objeve":
  869.  
  870.     objeve %aurora2.
  871.  
  872.   In the example above, the object "aurora2" becomes the current event
  873.   object.
  874.  
  875.  
  876.   You can place your own user-generated events in the interpreter event
  877.   queue using the native function "que". For example:
  878.  
  879.     que% xyz 1 3.
  880.  
  881.   In the example above, the function call "xyz 1 3" is placed on the
  882.   interpreter event queue. The next time the interpreter is idle, it
  883.   will read "xyz 1 3" from the event queue and evaluate it in the
  884.   current event object, just like a keyboard or mouse event.
  885.  
  886.   User-generated events can also be directed to an explicitly specified
  887.   object (other than the event object), by using the native function
  888.   "queobj". For example:
  889.  
  890.     queobj% aurora xyz 1 3.
  891.  
  892.   In the example above, "xyz 1 3" is placed on the interpreter event
  893.   queue. However, when the interpreter later reads "xyz 1 3" from the
  894.   event queue, it will force the evaluation of "xyz 1 3" to occur in the
  895.   object "aurora", not in the current event object.
  896.  
  897.   The native functions "send" and "sendobj" work just like "que" and
  898.   "queobj" above, except that the interpreter event queue is bypassed.
  899.   The functions specified in "send" and "sendobj" are always called
  900.   immediately. For example:
  901.  
  902.     send% xyz 1 3.
  903.     sendobj% aurora abc 5 7.
  904.                                                     Handling Events   16
  905.  
  906.  
  907.   In the examples above, "xyz 1 3" is evaluated immediately in the
  908.   current event object, and "abc 5 7" is evaluated immediately in the
  909.   object "aurora".
  910.  
  911.  
  912.   1-13  The Interpreter and Compiler
  913.   ──────────────────────────────────
  914.  
  915.   The Aurora Macro Language contains native functions for compiling and
  916.   evaluating macro language code.
  917.  
  918.   To evaluate a string of macro language source code from within a macro
  919.   language program, use the "evl" function. For example:
  920.  
  921.     = %x "+ 4 5 6".
  922.     = %y (evl x).
  923.  
  924.   In the example above, the local variable "x" is assigned a string
  925.   which is a macro language expression. In the next sentence, the "evl"
  926.   function evaluates the value of "x" and assigns the result (15) to
  927.   "y".
  928.  
  929.   Since there are many native functions for manipulating strings, you
  930.   can actually construct code dynamically and execute it from within a
  931.   running macro language program using the "evl" function.
  932.  
  933.   To evaluate macro language code in a file on disk, use the native
  934.   function "objdsk". For example:
  935.  
  936.     objdsk %aurora "test.a" 3 4.
  937.  
  938.   In the example above, the contents of the file "test.a" are evaluated
  939.   and passed the arguments "3" and "4", with "aurora" as the default
  940.   object. The "objdsk" command will evaluate both macro language source
  941.   and compiled files (compiled files will execute faster).
  942.  
  943.   To compile a macro language source file on disk, use the native
  944.   function "comf". For example:
  945.  
  946.     comf "test.a" "test.x".
  947.  
  948.   In the example above, the file "test.a" is compiled and the result is
  949.   placed in the file "test.x".
  950.  
  951.   You can use any filenames you wish for source and compiled files. The
  952.   convention is to use the file extension ".A" for macro language source
  953.   files, and ".X" for compiled macro language files.
  954.                                                Native Function List   17
  955.  
  956.  
  957.   2-1  Native Function List
  958.   ─────────────────────────
  959.  
  960.   The following section summarizes all available native macro language
  961.   functions by category. Each native function is followed by a brief one
  962.   line description.
  963.  
  964.  
  965.   Definition Functions:
  966.  
  967.     =     - assign a value to a local variable
  968.     set   - assign a value to an object variable
  969.     ren   - rename an object variable or function
  970.     uns   - remove an object variable or function from an object
  971.  
  972.     fun   - define a function
  973.     arg   - map function arguments to local variables
  974.     qarg  - access function arguments by ordinal number
  975.  
  976.  
  977.   Conditional Functions:
  978.  
  979.     eq   - test strings for equality
  980.     eqi  - test strings for equality (ignoring case)
  981.     ne   - test strings for inequality
  982.     ==   - test integers for equality
  983.     !=   - test integers for inequality
  984.     <    - test if each argument is less than the next
  985.     >    - test if each argument is greater than the next
  986.     <=   - test if each argument is less than or equal to the next
  987.     >=   - test if each argument is greater than or equal to the next
  988.  
  989.  
  990.   Logical Functions:
  991.  
  992.     and  - test if all arguments are true
  993.     or   - test if one argument is true
  994.     !    - test if no arguments are true
  995.  
  996.  
  997.   Bitwise Functions:
  998.  
  999.     &    - return the "bitwise and" of two strings
  1000.     |    - return the "bitwise or" of two strings
  1001.     ^    - return the "bitwise exclusive or" of two strings
  1002.                                                Native Function List   18
  1003.  
  1004.  
  1005.   Control Flow Functions:
  1006.  
  1007.     if       - if-then-else structure
  1008.     while    - loop while first argument is true
  1009.     dowhile  - loop while second argument is true
  1010.  
  1011.  
  1012.   Arithmetic Functions:
  1013.  
  1014.     +    - add all arguments together
  1015.     -    - subtract arguments from first argument
  1016.     *    - multiply all arguments together
  1017.     /    - divide first argument by other arguments
  1018.     mod  - return modulus of first argument divided by second argument
  1019.  
  1020.  
  1021.   String Functions:
  1022.  
  1023.     cat  - concatenates all arguments
  1024.     sub  - get a substring of the first argument
  1025.     fin  - search for a string in another string, with optional replace
  1026.     siz  - return the total size (in bytes) of arguments
  1027.     dup  - duplicate a string any number of times
  1028.     wrd  - set the character set to define a "word"
  1029.     idx  - search for the first of a group of characters in a string
  1030.     vfy  - verify that a string is composed of specified characters
  1031.     chc  - change the case of a string
  1032.  
  1033.     byte - convert an integer to a 1-byte string
  1034.     word - convert an integer to a 2-byte string
  1035.     long - convert an integer to a 4-byte string
  1036.     hex  - convert a hex string to a normal string
  1037.     toh  - convert a normal string to a hex string
  1038.  
  1039.  
  1040.   Evaluation and Compilation Functions:
  1041.  
  1042.     evl  - evaluate a string as macro language code
  1043.     evla - evaluate a string as if it were a function argument
  1044.     comf - compile a macro language source file
  1045.     #get - include a macro language source or compiled file
  1046.     var  - evaluate a string as if it were a variable
  1047.     prs  - parse a string for input to evl or evla.
  1048.                                                Native Function List   19
  1049.  
  1050.  
  1051.   Miscellaneous Functions:
  1052.  
  1053.     asc  - return the ascii integer value of a character
  1054.     pat  - expand a filename to fully qualified name
  1055.     exe  - execute a DOS program
  1056.     wait - delay for a specified number of milliseconds
  1057.     beep - beep the PC speaker
  1058.  
  1059.  
  1060.   Object Functions:
  1061.  
  1062.     obj     - add functions and variables to an object
  1063.     objnew  - create a new object and establish object ancestry
  1064.     objdes  - destroy an object
  1065.     objsav  - save an object
  1066.     objnam  - rename an object
  1067.     objeve  - change the current event object
  1068.     objpar  - change the ancestry of an object
  1069.     objdsk  - evaluate macro language source or compiled code in a file
  1070.  
  1071.     qobj    - test for the existence of an object
  1072.     qobjsiz - return the size of an object (variables and functions)
  1073.     qobjexe - return the current object
  1074.     qobjeve - return the current event object
  1075.     qobjanc - test for the ancestry of an object
  1076.  
  1077.  
  1078.   Disk and File Functions:
  1079.  
  1080.     dskdel  - delete a file
  1081.     dskren  - rename a file
  1082.     dskloc  - search for a file in multiple directories
  1083.     dskfin  - search for a string in a file
  1084.     dskcpy  - copy a file
  1085.     dskcur  - change the current disk drive and/or path
  1086.     dskdir  - create a directory
  1087.     dsktch  - touch a file
  1088.     dskatt  - change file attributes
  1089.     dskopn  - open a file for reading or writing
  1090.     dskcls  - close a file
  1091.     dskrea  - read characters from a file
  1092.     dskwri  - write characters to a file
  1093.     dskpos  - change the current position in an open file
  1094.  
  1095.     qdskatt - test if a file has specified attributes
  1096.     qdskpat - return the current drive/path or boot path
  1097.     qdskdrv - return available disk drives
  1098.     qdskcap - return disk drive capacity (total and used)
  1099.  
  1100.  
  1101.   System Functions:
  1102.  
  1103.     sysmem  - define maximum XMS/EMS memory
  1104.                                                Native Function List   20
  1105.  
  1106.  
  1107.     sysswp  - define swap files
  1108.     sysprt  - define printer settings
  1109.     syssnd  - enable or disable sound
  1110.  
  1111.     qsysver - return the current version of The Aurora Editor
  1112.     qsysos  - return the current version of the operating system (DOS)
  1113.     qsyspgm - return the name of The Aurora Editor .EXE file
  1114.     qsysvar - return the value of an environment variable
  1115.  
  1116.  
  1117.   Timer Functions:
  1118.  
  1119.     timdes  - destroy a timer
  1120.     timint  - create a interval timer
  1121.     timalm  - create an alarm timer
  1122.  
  1123.     qtim    - return the current time
  1124.  
  1125.  
  1126.   Keyboard Functions:
  1127.  
  1128.     kbdenh  - enable/disable enhanced keyboard
  1129.     kbdrpt  - define keyboard event reporting mode
  1130.     kbdclr  - clear keyboard buffer
  1131.  
  1132.     qkbdshf - return keyboard shift status
  1133.     qkbdchr - wait for a character to be entered and return it
  1134.  
  1135.  
  1136.   Mouse Functions:
  1137.  
  1138.     mouini  - open and initialize the mouse
  1139.     moutrm  - close the mouse
  1140.     mousen  - adjust mouse sensitivity
  1141.     mourpt  - define mouse event reporting mode
  1142.     moupos  - set the mouse position
  1143.     mouvis  - show/hide the mouse
  1144.  
  1145.     qmoupos - return the mouse x or y position
  1146.  
  1147.  
  1148.   Queue Functions:
  1149.  
  1150.     que       - post an event to the event queue
  1151.     send      - send event directly to the event object (bypass queue)
  1152.     queobj    - post an event to an object
  1153.     sendobj   - send an event directly to any object (bypass queue)
  1154.     quedis    - read and dispatch the next event from the event queue
  1155.     quesiz    - set the size of the event queue
  1156.     quequi    - force quedis to return null
  1157.                                                Native Function List   21
  1158.  
  1159.  
  1160.   Video Functions Functions:
  1161.  
  1162.     vidcsz    - set the visible cursor size
  1163.     vidbli    - set the video blink mode
  1164.     vidfon    - set the video mode
  1165.     vidorg    - set the mapping of the virtual to physical screen
  1166.     vidpri    - print a string on the screen
  1167.     vidbor    - set the color of the screen overscan border
  1168.     vidoff    - turn video off
  1169.     vidon     - turn video on
  1170.  
  1171.     qvidmon   - test for monochrome
  1172.     qvidp     - return video info (mapping, size, and blink mode)
  1173.  
  1174.  
  1175.   Text Buffer Functions:
  1176.  
  1177.     texdra   - redraw all windows displaying the specified text buffer
  1178.     texcre   - create a new text buffer
  1179.     texmen   - create a menu text buffer
  1180.     texdes   - destroy a text buffer
  1181.     texloa   - create a text buffer from a file or directory on disk
  1182.     texnam   - rename a text buffer
  1183.     textop   - make a text buffer the current default text buffer
  1184.     texdty   - set or clear the text buffer dirty flag
  1185.     texdlm   - set text buffer line delimiter or binary line length
  1186.     texusz   - set text buffer undo/redo stack size
  1187.  
  1188.     texovl   - overlay a string at an [x,y] position in a text buffer
  1189.     texinsx  - insert a string at an [x,y] position in a text buffer
  1190.     texdelx  - delete a string at an [x,y] position in a text buffer
  1191.     texinsy  - insert one or more strings as lines in a text buffer
  1192.     texdely  - delete one or more lines in a text buffer
  1193.  
  1194.     qtex     - test for the existence of a text buffer
  1195.     qtexlin  - return a portion of a line in a text buffer
  1196.     qtexend  - return the number of lines in text buffer
  1197.     qtexpre  - return the previous text buffer in the text buffer list
  1198.     qtexdty  - return the value of the dirty flag
  1199.     qtextru  - return the value of the truncate flag
  1200.     qtexlen  - return the length of a line
  1201.     qtexbeg  - return the position of the first non-blank char in a line
  1202.     qtexfld  - return info about a text fold
  1203.     qtextop  - return the default text buffer
  1204.     qtexmrk  - return info about marks associated with a text buffer
  1205.  
  1206.     qtexbin  - return text buffer binary line length
  1207.     qtexmen  - return info about a menu text buffer
  1208.     qtexdir  - return info about a directory listing from texloa
  1209.                                                Native Function List   22
  1210.  
  1211.  
  1212.     undbeg   - start saving undo/redo information for a text buffer
  1213.     undend   - stop saving undo/redo information for a text buffer
  1214.     und      - undo or redo last text buffer change
  1215.  
  1216.  
  1217.   Mark Functions:
  1218.  
  1219.     mrkset  - create a new mark or modify an existing mark
  1220.     mrkdes  - destroy a mark
  1221.     mrknam  - rename a mark
  1222.     mrktop  - make a cursor mark the default mark
  1223.     mrkcol  - change the color of a mark
  1224.  
  1225.     mrkdel  - delete the text within a mark
  1226.     mrkins  - copy the text within a mark at a new location
  1227.     mrkmov  - move the text within a mark to a new location
  1228.     mrkovl  - overlay the text within a mark at a new location
  1229.  
  1230.     mrkshf  - shift the text within a mark left or right
  1231.  
  1232.     mrkfil  - fill a mark with a character
  1233.     mrkcas  - change the case of the text within a mark
  1234.     mrkjus  - justify the text within a mark (left, right, center)
  1235.     mrksrt  - sort the text within a mark
  1236.     mrktab  - expand the tab characters within a mark
  1237.  
  1238.     mrkrfl  - reflow the text within a mark
  1239.     mrksav  - save or print the text within a mark
  1240.     mrkfin  - search for and optionally replace text within a mark
  1241.     mrkrel  - relocate a mark to a new position or text buffer
  1242.     mrkfld  - create new text folds or remove existing text folds
  1243.  
  1244.     qmrk    - test for the existence of a mark
  1245.     qmrkpre - return the previous mark in the text buffer mark list
  1246.     qmrktex - return the text buffer name associated with a mark
  1247.     qmrkp   - return the mark coordinates, width, or height
  1248.     qmrkcol - return the column position of a mark (cursor marks)
  1249.     qmrklin - return the first line number of a mark (cursor marks)
  1250.     qmrkins - return the insert/overlay state of a mark (cursor marks)
  1251.     qmrktyp - return the type of mark
  1252.     qmrkbuf - return the contents of a column mark
  1253.     qmrkwin - return the window associated with a cursor mark
  1254.  
  1255.  
  1256.   Window Functions:
  1257.  
  1258.     windra  - redraw specified portion of a window
  1259.     winset  - create, hide, or show a window
  1260.                                                Native Function List   23
  1261.  
  1262.  
  1263.     windes  - destroy a window
  1264.     winnam  - rename a window
  1265.     winttl  - change a window title
  1266.     wineot  - change the window end-of-text line
  1267.     winmen  - set the menu bar for a window
  1268.     winmeh  - highlight a menu bar item for a window
  1269.     wintic  - set the title bar controls for a window
  1270.     winmrk  - set the cursor mark for a window
  1271.     winpar  - set the window parent
  1272.     winnex  - alter the placement of the window in the window list
  1273.     winpre  - alter the placement of the window in the window list
  1274.     winvib  - create a local video buffer for a window
  1275.  
  1276.     wincol  - set the window colors
  1277.     winbor  - set the window borders
  1278.     winfra  - set the window frame components
  1279.     winshd  - set the window shadow
  1280.     winsh2  - set the window shadow for dialog controls
  1281.  
  1282.     winscr  - scroll the contents of a window
  1283.     winadj  - scroll the contents of a window without moving cursor
  1284.     winbar  - set a window scroll bar thumb position
  1285.     winsiz  - resize a window
  1286.     winmov  - move a window
  1287.     wintil  - tile windows on the screen
  1288.  
  1289.     qwin    - test for the existence of a window
  1290.     qwinmrk - return the cursor mark name associated with a window
  1291.     qwintex - return the name of the text buffer displayed in a window
  1292.     qwinx   - return the left-most column number displayed in a window
  1293.     qwiny   - return the top-most line number number displayed in a window
  1294.     qwintop - return the top window
  1295.     qwinbot - return the bottom window
  1296.     qwinpre - return the previous window in the window list
  1297.     qwinnex - return the next window in the window list
  1298.     qwinchi - return the first/last child window of a specified window
  1299.     qwinttl - return a window title string
  1300.     qwinpar - return the parent window of a specified window
  1301.     qwintit - return a window title or title highlight position
  1302.     qwincol - return the color of a window component
  1303.     qwinbor - return window border info
  1304.     qwinp   - return the window coordinates, height, or width
  1305.     qwinfra - return info about the window frame components
  1306.     qwinrgn - return the window regions at specified coordinates
  1307.     qwinbar - return the position of a scroll bar thumb
  1308.     qwincnt - return the number of windows or child windows
  1309.     qwinmen - return window menu bar info
  1310.     qwintic - return window title bar control info
  1311.                                           Native Functions - Detail   24
  1312.  
  1313.  
  1314.   3-1  Native Functions - In Detail
  1315.   ─────────────────────────────────
  1316.  
  1317.   The following sections describe each of the macro language native
  1318.   functions in detail. The functions are listed in the following format:
  1319.  
  1320.     functionname  [arg 1]  [arg 2]  [arg 3] ...
  1321.  
  1322.   The function name is listed first, followed by its arguments in
  1323.   brackets. The argument and return value "types" are not given, since
  1324.   they are always character strings.
  1325.  
  1326.   The "..." indicates that a variable number of arguments (similar to
  1327.   the previous arguments) may follow. Note that function arguments are
  1328.   always optional in The Aurora Macro Language. In many cases, the
  1329.   function will supply a default value if an argument is not specified,
  1330.   or a null value is specified.
  1331.  
  1332.   Many functions take an [options] character string as an argument. An
  1333.   option is just a one character code that tells the function to do
  1334.   something in a specific way. Each function may have its own set of
  1335.   options, each with their own meaning. In many cases, multiple options
  1336.   can be specified in the [options] character string. For example:
  1337.  
  1338.     fin s "b" %ir.   // the options "i" and "r" are passed to the
  1339.                      // function "fin"
  1340.  
  1341.   Some native function names may include a 3-character prefix (such as
  1342.   "obj", "tex", mrk", etc.) which indicates the "group" of related
  1343.   functions that the function belongs to. For example, "objnew" is an
  1344.   "object" function, "mrkset" is "mark" function, and "texcre" is a
  1345.   "text buffer" function. Within these function groups, functions whose
  1346.   only purpose is to return information are also prefixed by a "q"
  1347.   (query). For example, "qtexend" returns the number of lines in a text
  1348.   buffer.
  1349.  
  1350.   In functions which test for "true" or "false" (such as "if" or "and"),
  1351.   a value of null or "0" is false. Any other value is true.
  1352.  
  1353.   Remember, the following section describes "low-level" native
  1354.   functions. Many other "library" functions are available in The Aurora
  1355.   Editor (see "The Aurora Editor User's Guide"). Library functions are
  1356.   "built up" from native functions in The Aurora Macro Language, and are
  1357.   easier to use for most "high-level" editing operations.
  1358.                                                Definition Functions   25
  1359.  
  1360.  
  1361.   3-2  Definition Functions
  1362.   ─────────────────────────
  1363.  
  1364.   =  [var name]  [value].
  1365.  
  1366.     Assigns the value [value] to the local variable [var name]. The
  1367.     local variable is defined only within the current function
  1368.     definition. Returns 1 if success or null if failure.
  1369.  
  1370.  
  1371.   set  [obj var name]  [value].
  1372.  
  1373.     Assigns the value [value] to the object variable [obj var name]. The
  1374.     assignment remains in effect until another assignment is made to the
  1375.     same variable name, or the variable is destroyed or renamed with the
  1376.     "uns" or "ren" functions (see below). The variable will also be
  1377.     destroyed if the object containing the variable is destroyed.
  1378.     Returns 1 if success or null if failure.
  1379.  
  1380.  
  1381.   ren  [obj var name]  [new obj var name].
  1382.  
  1383.     Renames the object variable [obj var name] to [new obj var name].
  1384.     Only the name of the variable changes, not the value. Returns 1 if
  1385.     success or null if failure.
  1386.  
  1387.  
  1388.   uns  [obj var name].
  1389.  
  1390.     Destroys or "un-sets" the object variable [obj var name]. Both the
  1391.     variable name and value are removed from the object in which they
  1392.     are contained. Returns 1 if success or null if failure.
  1393.  
  1394.  
  1395.   fun  [function name]  [function body]  [arg 1]  [arg 2] ...
  1396.  
  1397.     Defines the function [function name] by assigning the macro language
  1398.     expression [function body] to the function [function name].
  1399.  
  1400.     [arg 1], [arg 2], etc. arg seldom used. They tell the macro language
  1401.     compiler which arguments are to be compiled whenever they are
  1402.     encountered in a call to [function name]. This can speed up
  1403.     performance when an argument to a [function name] is a string
  1404.     containing a macro language expression which is to be evaluated
  1405.     within [function name]. [arg 1], [arg 2], etc. are integers
  1406.     specifying the relative position of the argument to be compiled.
  1407.  
  1408.     This function returns 1 if success or null if failure.
  1409.                                                Definition Functions   26
  1410.  
  1411.  
  1412.   arg  [var name 1]  [var name 2] ...
  1413.  
  1414.     Names the arguments passed to the function in which it is contained.
  1415.     After this call, the arguments can be accessed by name.
  1416.  
  1417.  
  1418.   qarg  [argument number n].
  1419.  
  1420.     Returns the "nth" argument passed to the function in which it is
  1421.     contained. If n is zero or null, the number of arguments passed to
  1422.     the function is returned.
  1423.  
  1424.  
  1425.  
  1426.   3-3  Conditional Functions
  1427.   ──────────────────────────
  1428.  
  1429.   eq  [string 1]  [string 2] ...
  1430.  
  1431.     Returns 1 if [string 1] is equal to any one of the arguments which
  1432.     follow it, otherwise it returns null.
  1433.  
  1434.  
  1435.   eqi  [string 1]  [string 2] ...
  1436.  
  1437.     Returns 1 if [string 1] is equal (ignoring case) to any one of the
  1438.     arguments which follow it, otherwise it returns null.
  1439.  
  1440.  
  1441.   ne  [string 1]  [string 2] ...
  1442.  
  1443.     Returns 1 if [string 1] is not equal to any of the arguments which
  1444.     follow it, otherwise it returns null.
  1445.  
  1446.  
  1447.   ==  [string 1]  [string 2] ...
  1448.  
  1449.     Returns 1 if [string 1] is numerically equal to any one of the
  1450.     arguments which follow it, otherwise it returns null.
  1451.  
  1452.  
  1453.   !=  [string 1]  [string 2] ...
  1454.  
  1455.     Returns 1 if [string 1] is not numerically equal to any one of the
  1456.     arguments which follow it, otherwise it returns null.
  1457.  
  1458.  
  1459.   <  [string 1]  [string 2] ...
  1460.  
  1461.     Returns 1 if each argument is numerically less than the next
  1462.     argument, otherwise it returns null.
  1463.                                               Conditional Functions   27
  1464.  
  1465.  
  1466.   >  [string 1]  [string 2] ...
  1467.  
  1468.     Returns 1 if each argument is numerically greater than the next
  1469.     argument, otherwise it returns null.
  1470.  
  1471.  
  1472.   <=  [string 1]  [string 2] ...
  1473.  
  1474.     Returns 1 if each argument is numerically less than or equal to the
  1475.     next argument, otherwise it returns null.
  1476.  
  1477.  
  1478.   >=  [string 1]  [string 2] ...
  1479.  
  1480.     Returns 1 if each argument is numerically greater than or equal to
  1481.     the next argument, otherwise it returns null.
  1482.  
  1483.  
  1484.  
  1485.   3-4  Logical Functions
  1486.   ──────────────────────
  1487.  
  1488.   and  [string 1]  [string 2] ...
  1489.  
  1490.     Evaluates all arguments until an argument returns "0" or null, in
  1491.     which case it returns null, otherwise it returns 1.
  1492.  
  1493.  
  1494.   or  [string 1]  [string 2] ...
  1495.  
  1496.     Evaluates all arguments until an argument does not return "0" or
  1497.     null, in which case it returns 1, otherwise it returns null.
  1498.  
  1499.  
  1500.   !  [string 1]  [string 2] ...
  1501.  
  1502.     Returns 1 if all arguments are either "0" or null, otherwise it
  1503.     returns null.
  1504.  
  1505.  
  1506.  
  1507.   3-5  Bitwise Logical Functions
  1508.   ──────────────────────────────
  1509.  
  1510.   &  [string 1]  [string 2].
  1511.  
  1512.     Returns [string 1] "and-ed bitwise" with [string 2].
  1513.                                           Bitwise Logical Functions   28
  1514.  
  1515.  
  1516.   |  [string 1]  [string 2].
  1517.  
  1518.     Returns [string 1] "or-ed bitwise" with [string 2].
  1519.  
  1520.  
  1521.   ^  [string 1]  [string 2].
  1522.  
  1523.     Returns [string 1] "xor-ed bitwise" with [string 2].
  1524.  
  1525.  
  1526.  
  1527.   3-6  Control Functions
  1528.   ──────────────────────
  1529.  
  1530.   if  [condition]  [then body]  [else body].
  1531.  
  1532.     Evaluates the expression [condition]. If it is not "0" or null, then
  1533.     the expression [then body] is evaluated, otherwise the expression
  1534.     [else body] is evaluated. Returns the value of the evaluated
  1535.     expression.
  1536.  
  1537.  
  1538.   while  [condition]  [while body].
  1539.  
  1540.     Evaluates the expression [while body] while the expression
  1541.     [condition] does not evaluate to "0" or null. [condition] is
  1542.     evaluated before the first evaluation of [while body]. Returns null.
  1543.  
  1544.  
  1545.   dowhile  [while body]  [condition].
  1546.  
  1547.     Evaluates the expression [while body] while the expression
  1548.     [condition] does not evaluate to "0" or null. [condition] is
  1549.     evaluated after the first evaluation of [while body]. Returns null.
  1550.  
  1551.  
  1552.  
  1553.   3-7  Arithmetic Functions
  1554.   ─────────────────────────
  1555.  
  1556.   +  [integer 1]  [integer 2] ...
  1557.  
  1558.     Returns the numeric sum of all arguments.
  1559.  
  1560.  
  1561.   -  [integer 1]  [integer 2] ...
  1562.  
  1563.     If only one argument is specified, this function returns the numeric
  1564.     negative of the argument, otherwise it returns the result of
  1565.     subtracting all arguments after the first argument, from the first
  1566.     argument.
  1567.                                                Arithmetic Functions   29
  1568.  
  1569.  
  1570.   *  [integer 1]  [integer 2] ...
  1571.  
  1572.     Returns the numeric product of all arguments.
  1573.  
  1574.  
  1575.   /  [integer 1]  [integer 2] ...
  1576.  
  1577.     Returns the result of dividing the first argument by all arguments
  1578.     after the first argument.
  1579.  
  1580.  
  1581.   mod  [integer 1]  [integer 2]
  1582.  
  1583.     Returns the modulus of dividing the first argument by the second
  1584.     argument.
  1585.  
  1586.  
  1587.   3-8  String Functions
  1588.   ─────────────────────
  1589.  
  1590.   cat  [string 1]  [string 2] ...
  1591.  
  1592.     Returns the concatenated string of all arguments. For example:
  1593.  
  1594.       cat "abc" "123" %xyz.        // returns "abc123xyz"
  1595.       cat "var" (+ 1 2).           // returns "var3"
  1596.  
  1597.  
  1598.   sub  [string]  [position]  [length].
  1599.  
  1600.     Returns the substring of [string] starting at character position
  1601.     [position] and extending for a length of [length] characters. If
  1602.     [length] is zero or not specified, then the length used is the
  1603.     length from position to the end of [string]. For example:
  1604.  
  1605.       sub "Aurora" 3.             // returns "rora"
  1606.       sub "Aurora" 3 2.           // returns "ro"
  1607.  
  1608.  
  1609.   fin  [string]  [search string]  [options]  [replace string].
  1610.  
  1611.     Searches for [search string] within [string]. Any combination of the
  1612.     following [options] may be specified:
  1613.  
  1614.       i - case insensitive search
  1615.       r - search in "reverse", starting from the end of the string
  1616.       w - search for "whole words" only
  1617.  
  1618.     If [replace string] is not specified, this function returns the
  1619.     character position where [search string] was found in [string]
  1620.     (returns "0" if not found).
  1621.                                                    String Functions   30
  1622.  
  1623.  
  1624.     If [replace string] is specified, this function returns a string
  1625.     where every occurrence of [search string] has been replaced with
  1626.     [replace string].
  1627.  
  1628.     Examples:
  1629.  
  1630.       fin "Aurora" %r.            // returns "3"
  1631.       fin "Aurora" %R %ri.        // returns "5"
  1632.       fin "Aurora" %r @ %XYZ.     // returns "AuXYZoXYZa"
  1633.       fin "Aurora" %k.            // returns "0"
  1634.  
  1635.  
  1636.   siz  [string 1]  [string 2] ...
  1637.  
  1638.     Returns the sum of the string lengths of all of its arguments.
  1639.     For example:
  1640.  
  1641.       siz "Aurora".               // returns "6"
  1642.       siz "xyz" %abc %Z.          // returns "7"
  1643.  
  1644.  
  1645.   dup  [size]  [fill string].
  1646.  
  1647.     Returns a string of length [size]. If [fill string] is specified,
  1648.     the string is filled by duplicating [fill string] enough times to
  1649.     fill the string. For example:
  1650.  
  1651.       dup 10 "abc".    returns "abcabcabca"
  1652.  
  1653.     If [fill string] is not specified, the contents of the return string
  1654.     are undefined. Returns null if failure.
  1655.  
  1656.  
  1657.   wrd  [char set].
  1658.  
  1659.     Sets the default character set for defining a "word" for the "whole
  1660.     words" only search option. The "whole words" only search option is
  1661.     used by the "fin" and "mrkfin" functions. [char set] is a string
  1662.     composed of all the characters in the character set. Character
  1663.     ranges can be indicated with a hyphen (-). For example:
  1664.  
  1665.       wrd "abcA-Z0".
  1666.  
  1667.     The example above sets the default character set to the characters
  1668.     a, b, c, 0, and the characters A through Z.
  1669.  
  1670.  
  1671.   idx  [string 1]  [string 2].
  1672.  
  1673.     Returns the position in [string 1] of the first character contained
  1674.     in [string 2]. Returns null if none are found. For example:
  1675.                                                    String Functions   31
  1676.  
  1677.  
  1678.       idx "abcde" %b.             // returns "2"
  1679.       idx "abcde" %tdv.           // returns "4"
  1680.       idx "abcde" %xyz.           // returns null
  1681.  
  1682.  
  1683.   vfy  [string 1]  [string 2].
  1684.  
  1685.     Returns the position in [string 1] of the first character not
  1686.     contained in [string 2]. Character ranges such as "a-zA-Z0-9" can be
  1687.     specified for [string 2]. Returns null if all characters in [string
  1688.     1] are contained in [string 2]. For example:
  1689.  
  1690.       vfy "Aurora" "auro".        // returns null
  1691.       vfy "Aurora" "aur".         // returns "4"
  1692.       vfy "Aurora" %a.            // returns "2"
  1693.  
  1694.  
  1695.   chc  [string]  [options].
  1696.  
  1697.     Changes the case of [string] and returns the result. The following
  1698.     [options] may be specified:
  1699.  
  1700.       l - change all characters to lower case
  1701.       u - change all characters to upper case
  1702.  
  1703.     If no options are specified, "u" is assumed. If options "u" and "l"
  1704.     are both specified, the case of each character in the string is
  1705.     toggled or "flipped". For example:
  1706.  
  1707.       chc "Aurora".               // returns "AURORA"
  1708.       chc "Aurora" %l.            // returns "aurora"
  1709.       chc "Aurora" %ul.           // returns "aURORA"
  1710.  
  1711.  
  1712.   byte  [integer 1]  [integer 2] ...
  1713.  
  1714.     Converts each integer argument to a string of length 1 (a 1-byte
  1715.     binary number) and returns the concatenated result. For example:
  1716.  
  1717.       byte 32 32 20h.
  1718.  
  1719.     The example above returns a string of 3 blanks.
  1720.  
  1721.  
  1722.   word  [integer 1]  [integer 2] ...
  1723.  
  1724.     Converts each integer argument to a string of length 2 (a 2-byte
  1725.     binary number) and returns the concatenated result.
  1726.  
  1727.  
  1728.   long  [integer 1]  [integer 2] ...
  1729.  
  1730.     Converts each integer argument to a string of length 4 (a 4-byte
  1731.     binary number) and returns the concatenated result.
  1732.                                Evaluation and Compilation Functions   32
  1733.  
  1734.  
  1735.   hex  [string 1]  [string 2] ...
  1736.  
  1737.     Converts every two hex characters in each argument string to 1
  1738.     character and returns the concatenated result. For example:
  1739.  
  1740.       hex "202020" "2020".
  1741.  
  1742.     The example above returns a string of 5 blanks.
  1743.  
  1744.  
  1745.   toh  [string 1]  [string 2] ...
  1746.  
  1747.     Converts every character in each argument string to 2 hex characters
  1748.     and returns the concatenated result. For example:
  1749.  
  1750.       toh "ABC" "12".
  1751.  
  1752.     The example above returns the string "4142433132".
  1753.  
  1754.  
  1755.   3-9  Evaluation and Compilation Functions
  1756.   ─────────────────────────────────────────
  1757.  
  1758.  
  1759.   evl   [expression]  [reps].
  1760.   evla  [expression]  [reps].
  1761.  
  1762.     These functions evaluate [expression] for [reps] number of times.
  1763.     [reps] defaults to "1" if not specified. These functions return the
  1764.     result of the last evaluation of [expression].
  1765.  
  1766.     The function "evla" evaluates [expression] as if it were an argument
  1767.     to a function, whereas "evl" evaluates [expression] as a macro
  1768.     language sentence.
  1769.  
  1770.     Note that [expression] is not "parsed" before it is evaluated. If
  1771.     [expression] must be parsed, use the "prs" function first. For
  1772.     example:
  1773.  
  1774.       = %e "beep    100    100".
  1775.       evl (prs e).
  1776.  
  1777.     The example above parses the value of the variable "e", evaluates it
  1778.     as a macro language sentence, and beeps the PC speaker.
  1779.  
  1780.  
  1781.   comf  [source file]  [compiled file].
  1782.  
  1783.     Compiles the macro language source code in the file [source file]
  1784.     and places the compiled code in the file [compiled file]. If
  1785.     [compiled file] already exists, then it is overwritten. Returns 1 if
  1786.     success, or null if failure.
  1787.                                Evaluation and Compilation Functions   33
  1788.  
  1789.  
  1790.   #get  [source or compiled file].
  1791.  
  1792.     Includes the specified macro language source or compiled file into
  1793.     the current macro source code when it is evaluated or compiled.
  1794.  
  1795.  
  1796.   var  [string].
  1797.  
  1798.     Evaluates [string] as a variable and returns the value of the
  1799.     variable. For example:
  1800.  
  1801.       var (cat "xy" "z").
  1802.  
  1803.     The example above returns the value of the variable "xyz".
  1804.  
  1805.  
  1806.   prs  [expression].
  1807.  
  1808.     Parses the macro language expression [expression] and returns the
  1809.     result. Parsing will remove comments and insignificant spaces from
  1810.     the expression.
  1811.  
  1812.     Parsing is normally done automatically by the "objdsk" function when
  1813.     source code is loaded and executed, or by the "comf" function when
  1814.     source code is compiled. However, if a string is constructed and
  1815.     evaluated while a macro language program is executing, it should
  1816.     first be parsed before being evaluated by the "evl" function. For
  1817.     example:
  1818.  
  1819.       prs "beep  100     100. // beep the speaker".
  1820.  
  1821.     The example above returns the string "beep 100 100", which can be
  1822.     then be evaluated by the "evl" function.
  1823.  
  1824.  
  1825.   3-10  Miscellaneous Functions
  1826.   ─────────────────────────────
  1827.  
  1828.   asc  [string].
  1829.  
  1830.     Returns the integer ascii value of the first character in [string].
  1831.     For example:
  1832.  
  1833.       asc "A".                         // returns "65"
  1834.  
  1835.  
  1836.   pat  [filename]  [filename2/path].
  1837.  
  1838.     Expands [filename] to a fully qualified filename if it is not fully
  1839.     qualified or ambiguous. The second argument [filename2/path] is used
  1840.     as the "template" to construct the fully qualified name. If
  1841.     [filename2/path] is not specified, then the current drive and
  1842.     directory are used as the template. For example:
  1843.  
  1844.       pat "xyz.c" "d:\a\*.*".         // returns "d:\a\xyz.c".
  1845.                                             Miscellaneous Functions   34
  1846.  
  1847.  
  1848.   exe  [command]  [options]  [memory].
  1849.  
  1850.     Executes the DOS command [command]. The string [command] is the DOS
  1851.     program name (.EXE or .COM file) and parameters exactly as you would
  1852.     type them on the DOS command line. The following [options] may be
  1853.     specified:
  1854.  
  1855.       k  - prompts the user to return when the command is completed
  1856.       c  - clears the screen before the command begins and restores
  1857.            the screen after the command is completed
  1858.  
  1859.  
  1860.     [memory] specifies the amount of memory (in k) to request from DOS
  1861.     for the program. If [memory] is -1, then the maximum available
  1862.     memory will be used. The interpreter may swap to XMS memory, EMS
  1863.     memory, or disk to satisfy this request.
  1864.  
  1865.     Note: If option "k" is specified, then option "c" is used
  1866.     internally, whether or not it is specified in the function call.
  1867.  
  1868.  
  1869.   wait  [milliseconds].
  1870.  
  1871.     Delays execution for the time period specified by [milliseconds].
  1872.  
  1873.  
  1874.   beep  [frequency]  [duration].
  1875.  
  1876.     "Beeps" the PC speaker for the specified frequency and duration. If
  1877.     [duration] is omitted or zero, the speaker sounds at the specified
  1878.     frequency until "beep" is called again with no arguments.
  1879.     [frequency] is in herz and [duration] is in milliseconds.
  1880.  
  1881.  
  1882.   3-11  Object Functions
  1883.   ──────────────────────
  1884.  
  1885.   Object functions are used to manipulate and return information about
  1886.   macro language objects. Objects can be used to logically group
  1887.   together related functions and variables. There are functions for
  1888.   creating and destroying objects, setting and querying an object's
  1889.   ancestry, and changing the current "event" handling object. Also, the
  1890.   "objdsk" function can evaluate macro code in a file on disk. Object
  1891.   function names use the prefix "obj".
  1892.  
  1893.  
  1894.   objnew  [obj name]  [estimated size]  [obj 1]  [obj 2] ...
  1895.  
  1896.     Creates a new object [obj name], and optionally establishes the
  1897.     ancestry of the object. [estimated size] is the estimated number of
  1898.     variables and functions which you believe the object may contain,
  1899.     and is used to optimize internal tables. [obj 1], [obj 2], etc are
  1900.     optional "ancestor" objects from which [obj name] may "inherit"
  1901.     functions and variable assignments. Returns 1 if success or null if
  1902.     failure.
  1903.                                                    Object Functions   35
  1904.  
  1905.  
  1906.   obj  [obj name]  [obj body].
  1907.  
  1908.     Adds functions and variables to the object [obj name]. When [obj
  1909.     body] is evaluated, any function definitions or object variable
  1910.     assignments within [obj body] are added to the object [obj name].
  1911.  
  1912.  
  1913.   objdes  [obj name].
  1914.  
  1915.     Destroys the object [obj name]. The object [obj name] is also
  1916.     removed from the inheritance path of other objects, if applicable.
  1917.  
  1918.  
  1919.   objsav  [obj name]  [filename]  [options].
  1920.  
  1921.     Saves the object [obj name] in the file [filename] as a compiled
  1922.     sequence of "set" function calls. The "objdsk" function can be used
  1923.     to reload the object from disk. The following options may be
  1924.     specified:
  1925.  
  1926.       a - append to the end of [filename]
  1927.  
  1928.     Returns 1 if success or null if failure.
  1929.  
  1930.  
  1931.   objnam  [obj name]  [new obj name].
  1932.  
  1933.     Renames the object [obj name] to [new obj name]. Returns 1 if
  1934.     success or null if failure.
  1935.  
  1936.  
  1937.   objeve  [obj name].
  1938.  
  1939.     Makes the object [obj name] the current "event" object. The event
  1940.     object is where the interpreter looks for event handler functions
  1941.     when dispatching events from the internal event queue.
  1942.  
  1943.  
  1944.   objpar  [obj name]  [obj 1]  [obj 2] ...
  1945.  
  1946.     Changes the "inheritance path" or ancestry of the object [obj name]
  1947.     to [obj 1], [obj 2], etc.
  1948.  
  1949.  
  1950.   objdsk  [obj name]  [filename]  [arg 1]  [arg 2] ...
  1951.  
  1952.     Evaluates the macro language source or compiled code in [filename],
  1953.     with the object [obj name] as the default object. [arg 1], [arg 2],
  1954.     etc. are arguments passed to the macro code in [filename]. This
  1955.     function returns the value of the last sentence evaluated in
  1956.     [filename].
  1957.                                                    Object Functions   36
  1958.  
  1959.  
  1960.   qobj  [obj name].
  1961.  
  1962.     Returns 1 if the object [obj name] exists, otherwise it returns
  1963.     null.
  1964.  
  1965.  
  1966.   qobjsiz  [obj name].
  1967.  
  1968.     Returns the number of functions and variables in the object [obj
  1969.     name].
  1970.  
  1971.  
  1972.   qobjexe.
  1973.  
  1974.     Returns the name of the currently executing or "default" object.
  1975.  
  1976.  
  1977.   qobjeve.
  1978.  
  1979.     Returns the name of the current "event" object.
  1980.  
  1981.  
  1982.   qobjanc  [obj name]  [obj 2].
  1983.  
  1984.     Returns 1 if the object [obj name] has the object [obj 2] as an
  1985.     ancestor object in its inheritance path, or if [obj name] equals
  1986.     [obj 2], otherwise it returns null.
  1987.  
  1988.  
  1989.   3-12  Disk Functions
  1990.   ────────────────────
  1991.  
  1992.   Disk functions are used to manipulate files on disk, and to return
  1993.   path and drive information. Disk function names use the prefix "dsk".
  1994.  
  1995.  
  1996.   dskdel  [filename]  [options].
  1997.  
  1998.     Deletes the file [filename] and returns 1 if success, or null if
  1999.     failure. Empty directories can also be deleted if option "d" is
  2000.     specified.
  2001.  
  2002.  
  2003.   dskren  [filename]  [new filename].
  2004.  
  2005.     Renames the file [filename] to [new filename]. Returns 1 if success,
  2006.     or null if failure.
  2007.  
  2008.  
  2009.   dskloc  [filename]  [path].
  2010.  
  2011.     Searches the path string [path] for the file [filename]. [path] can
  2012.     be a sequence of paths separated by semicolons (;) (as in the DOS
  2013.     "PATH" environment string). This function returns the fully
  2014.     qualified filename if found, otherwise it returns null.
  2015.                                                      Disk Functions   37
  2016.  
  2017.  
  2018.   dskfin  [filename]  [string]  [options].
  2019.  
  2020.     Searches for the string [string] in the file [filename]. The
  2021.     following search [options] can be specified:
  2022.  
  2023.       i - case insensitive search
  2024.       w - search for "whole words" only
  2025.  
  2026.     This function returns the position in the file where the string was
  2027.     found ("1" is the first position), or null if not found. If the
  2028.     search was interrupted via <Ctrl-Break>, this function returns -1.
  2029.  
  2030.  
  2031.   dskcpy  [source filename]  [dest filename]  [options].
  2032.  
  2033.     Copies the file [source filename] to [dest filename]. The following
  2034.     [options] may be specified:
  2035.  
  2036.       a - append the source file to the destination file
  2037.       k - the destination file will keep the source file date/time
  2038.  
  2039.     This function returns non-zero if successful, otherwise it returns
  2040.     null.
  2041.  
  2042.  
  2043.   dskcur  [path]  [options].
  2044.  
  2045.     Sets the current drive or the current path for the specified drive.
  2046.     The following [options] can be specified:
  2047.  
  2048.       d - set the current drive
  2049.       p - set the current path
  2050.  
  2051.     For example:
  2052.  
  2053.       dskcur "d:" %d.       // set current drive to "d:"
  2054.       dskcur "c:\xyz" %p.   // set current directory for "c:" to "xyz"
  2055.       dskcur "c:\xyz" %dp.  // set current drive and directory
  2056.  
  2057.     Returns 1 if success or null if failure.
  2058.  
  2059.  
  2060.   dskdir  [path].
  2061.  
  2062.     Creates the new directory specified by [path]. All elements of the
  2063.     path must exist (except the last element). Returns 1 if success or
  2064.     null if failure.
  2065.                                                      Disk Functions   38
  2066.  
  2067.  
  2068.   dsktch  [filename].
  2069.  
  2070.     "Touches" the file [filename] by setting the file's date and time to
  2071.     the current date and time. Returns 1 if success or null if failure.
  2072.  
  2073.  
  2074.   dskatt  [filename]  [attributes].
  2075.  
  2076.     Changes the attributes of the file [filename] to [attributes]. The
  2077.     attributes of a directory can also be changed. [attributes] may be
  2078.     any combination of the following:
  2079.  
  2080.       r - read only
  2081.       h - hidden
  2082.       s - system
  2083.       a - archive
  2084.  
  2085.     Returns 1 if success or null if failure.
  2086.  
  2087.  
  2088.   dskopn  [filename]  [options].
  2089.  
  2090.     Opens the file [filename] for reading and writing, and returns a
  2091.     "file handle" for use by the "dskrea", "dskwri", "dskpos", and
  2092.     "dskcls" functions (see below). The "current position" in the open
  2093.     file is at the first character in the file. The following [options]
  2094.     can be specified:
  2095.  
  2096.       c - create a new file or truncate the file if it already exists
  2097.       r - open the file for reading only
  2098.       w - open the file for reading and writing
  2099.  
  2100.     This function returns null if failure.
  2101.  
  2102.  
  2103.   dskcls  [file handle].
  2104.  
  2105.     Closes the file opened by the "dskopn" function above.
  2106.  
  2107.  
  2108.   dskrea  [file handle]  [length].
  2109.  
  2110.     Reads data from the current position in the open file specified by
  2111.     [file handle]. [length] specifies the number of characters to read,
  2112.     and may not exceed 16000. The current position in the file is
  2113.     advanced by the amount of characters actually read.
  2114.                                                      Disk Functions   39
  2115.  
  2116.  
  2117.     This function returns a string composed of the data read from the
  2118.     file, or null if failure. The amount of characters actually read
  2119.     from the file can be determined by using the "siz" function with the
  2120.     return string.
  2121.  
  2122.  
  2123.   dskwri  [file handle]  [string]  [options].
  2124.  
  2125.     Writes the string [string] at the current position in the open file
  2126.     specified by [file handle]. The current position in the file is
  2127.     advanced by the amount of characters actually written. If [option]
  2128.     "k" is specified, the file's date and time are not modified.
  2129.  
  2130.     This function returns the amount of characters written, or null if
  2131.     failure.
  2132.  
  2133.  
  2134.   dskpos  [file handle]  [offset]  [options].
  2135.  
  2136.     Changes the current position in the open file specified by [file
  2137.     handle]. The new position depends on the value of [offset] and
  2138.     [options]. The following [options] may be specified:
  2139.  
  2140.       a - [offset] specifies an absolute position in the file ("1" is
  2141.           the first position).
  2142.       c - [offset] specifies an offset from the current position.
  2143.       e - [offset] specifies an offset from the end of the file.
  2144.  
  2145.     If no [options] are specified, then "a" is assumed. This function
  2146.     returns the new absolute position in the file ("1" is the first
  2147.     position).
  2148.  
  2149.  
  2150.   qdskatt  [filename]  [attributes]
  2151.  
  2152.     Tests whether or not [filename] has the specified attributes. Any
  2153.     combination of the following [attributes] can be specified:
  2154.  
  2155.       a - archive
  2156.       d - directory
  2157.       h - hidden
  2158.       r - read only
  2159.       s - system
  2160.       v - volume
  2161.  
  2162.     This function returns a non-null value if the specified attributes
  2163.     are present, or null if none are present.
  2164.                                                      Disk Functions   40
  2165.  
  2166.  
  2167.   qdskpat  [options].
  2168.  
  2169.     Returns the fully qualified boot path or the current path. The
  2170.     following [options] may be specified:
  2171.  
  2172.       b - return the boot path where the interpreter was invoked
  2173.       c - return the current path
  2174.  
  2175.     If no options are specified, the default is "c".
  2176.  
  2177.  
  2178.   qdskdrv  [options].
  2179.  
  2180.     Returns a string consisting of all available disk drive letters.
  2181.     The following [options] may be specified:
  2182.  
  2183.       t - include network information. "1" after the drive letter
  2184.           indicates a local drive, "2" indicates a network drive.
  2185.  
  2186.     For example, for a computer system with 3 logical hard drives, 2
  2187.     floppies, and network drives F and G:
  2188.  
  2189.       qdskdrv.      // returns "ABCDEFG"
  2190.       qdskdrv %t.   // returns "A1B1C1D1E1F2G2"
  2191.  
  2192.  
  2193.   qdskcap  [drive]  [options].
  2194.  
  2195.     Returns the total or free amount of disk space available on disk
  2196.     drive [drive], in bytes. The following options may be specified.
  2197.  
  2198.       c - return the total capacity of the drive
  2199.       f - return the free space on the drive
  2200.  
  2201.     If no drive is specified, the current drive is assumed. If no
  2202.     options are specified, the default is "c".
  2203.                                                    System Functions   41
  2204.  
  2205.  
  2206.   3-13  System Functions
  2207.   ──────────────────────
  2208.  
  2209.   System functions are used to control and provide information about the
  2210.   interpreter's operating environment. There are functions to control
  2211.   the interpreter's use of memory and printer devices, and functions to
  2212.   return information such as environment strings and version numbers.
  2213.   System function names use the prefix "sys".
  2214.  
  2215.  
  2216.   sysmem  [options]  [limit].
  2217.  
  2218.     Allows the use of XMS or EMS memory. [limit] is the maximum amount
  2219.     of XMS or EMS to use, in k (a value 0 or -1 indicates that the
  2220.     maximum available amount should be used). One of the following
  2221.     [options] may be specified:
  2222.  
  2223.       e - use EMS memory
  2224.       x - use XMS memory
  2225.  
  2226.     To use both XMS and EMS memory, this function must be called twice.
  2227.     Note that an XMS or EMS driver must be installed before this
  2228.     function can be called successfully. This function returns a
  2229.     non-zero value if success, otherwise it returns null.
  2230.  
  2231.   sysswp  [swap file 1]  [swap file 2]  [swap file 3].
  2232.  
  2233.     Sets the swap files names for the interpreter to use in low memory
  2234.     situations. The interpreter will use [swap file 2] only when there
  2235.     is no more room on the drive containing [swap file 1], and [swap
  2236.     file 3] only when there is no more room on the drive containing
  2237.     [swap file 2]. All swap files should be on different drives. Returns
  2238.     non-zero if success or null if failure.
  2239.  
  2240.     EMS and XMS memory (if available) will be used before the swap
  2241.     files.
  2242.  
  2243.  
  2244.   sysprt  [id]  [options]  [page size]  [left margin]  [top margin]
  2245.           [right margin]  [bottom margin]  [line spacing]  [copies].
  2246.  
  2247.     Sets the current printer settings. The following printer settings
  2248.     can be specified:
  2249.  
  2250.     - [id]
  2251.  
  2252.       not used (reserved for future use).
  2253.                                                    System Functions   42
  2254.  
  2255.  
  2256.     - [page size]
  2257.  
  2258.       Specifies the "Lines per Page" of printed output. This includes
  2259.       the [top margin] and [bottom margin]. After the specified lines
  2260.       per page have been printed, a formfeed character (ascii 12) will
  2261.       be sent to the printer and a new page will be started.
  2262.  
  2263.       If PrtPag is zero, printing will be continuous (no formfeed
  2264.       characters will be sent to the printer). [top margin], [bottom
  2265.       margin], and the "page number" option will be ignored.
  2266.  
  2267.     - [line spacing]
  2268.  
  2269.       Specifies the number of lines to advance after printing each line
  2270.       of output. A value of 1 generates single-spaced output, 2
  2271.       generates double-spaced output, and so on.
  2272.  
  2273.     - [copies]
  2274.  
  2275.       Specifies the number of copies to print.
  2276.  
  2277.     - [top margin]
  2278.  
  2279.       Specifies the number of blank lines to precede the printed output
  2280.       at the top of each page. This value is included in [page size].
  2281.       [top margin] is ignored if [page size] is set to zero.
  2282.  
  2283.     - [bottom margin]
  2284.  
  2285.       Specifies the number of blank lines to follow the printed output
  2286.       at the bottom of each page. This value is included in [page size].
  2287.       [bottom margin] is ignored if [page size] is set to zero.
  2288.  
  2289.     - [left margin]
  2290.  
  2291.       Specifies the number of blank columns to precede the printed
  2292.       output on each line.
  2293.  
  2294.     - [right margin]
  2295.  
  2296.       Specifies the column position at which to truncate each printed
  2297.       line. This column position is relative to column zero of the
  2298.       printed output, NOT the file being printed. If zero is specified,
  2299.       lines are not truncated.
  2300.  
  2301.     - [options]
  2302.  
  2303.       The following [options] can be specified:
  2304.                                                    System Functions   43
  2305.  
  2306.  
  2307.       h - prints a "header" at the top of each page. The header is
  2308.           specified in the "mrksav" function when printing. This option
  2309.           is ignored if [page size] is zero.
  2310.  
  2311.       f - prints a "footer" at the top of each page. The footer is
  2312.           specified in the "mrksav" function when printing. This option
  2313.           is ignored if [page size] is zero.
  2314.  
  2315.       s - adds a separator line after the header line and before the
  2316.           footer line.
  2317.  
  2318.       p - prints a right-justified page number on the header and footer
  2319.           lines. If neither a header or footer was specified, a blank
  2320.           header line is assumed. This option is ignored if [page size]
  2321.           is zero.
  2322.  
  2323.       l - prints a line number at the beginning of each line.
  2324.  
  2325.       e - sends a formfeed character to the printer when printing is
  2326.           completed.
  2327.  
  2328.  
  2329.   syssnd  [0/1].
  2330.  
  2331.     Enables (1) or disables (0) sound from the PC speaker.
  2332.  
  2333.  
  2334.   qsysver.
  2335.  
  2336.     Returns the current version of The Aurora Editor.
  2337.  
  2338.  
  2339.   qsysos  [options].
  2340.  
  2341.     Returns the operating system name or the operating system version.
  2342.     The following [options] may be specified:
  2343.  
  2344.       v - return major OS version
  2345.       m - return minor OS version
  2346.  
  2347.     If no options are specified, the operation system name ("DOS") is
  2348.     returned.
  2349.  
  2350.  
  2351.   qsyspgm.
  2352.  
  2353.     Returns the name of The Aurora Editor .EXE file that is currently
  2354.     executing, without path information or the .EXE extension. For
  2355.     example:
  2356.  
  2357.       qsyspgm.           // returns "A" or "A3"
  2358.                                                    System Functions   44
  2359.  
  2360.  
  2361.   qsysvar  [var name].
  2362.  
  2363.     Returns the environment string for the specified environment
  2364.     variable [var name]. [var name] must be in upper case. For example:
  2365.  
  2366.       qsysvar "PATH".   // returns the DOS PATH string
  2367.  
  2368.     This function returns null if the environment variable is not found.
  2369.  
  2370.  
  2371.   3-14  Timer Functions
  2372.   ─────────────────────
  2373.  
  2374.   Timer functions are used to create and destroy system "timers". Timers
  2375.   are used to automatically call user-defined functions at a specified
  2376.   time and date, or at periodic intervals. The "qtim" function also
  2377.   returns date and time information. Timer function names use the prefix
  2378.   "tim".
  2379.  
  2380.  
  2381.   timint  [timerid]  [interval]  [obj]  [fun]  [arg 1]  [arg 2] ...
  2382.  
  2383.     Sets an interval timer to call the function [fun] in the object
  2384.     [obj] with arguments [arg 1], [arg 2], etc. The function is called
  2385.     for every time interval (in milliseconds) specified by [interval].
  2386.  
  2387.     If [obj] is null, then the current "event" object is used. The
  2388.     [timerid] can be 0-9, and uniquely identifies the timer. Note that
  2389.     the first call to [fun] will occur after the specified time
  2390.     interval, not after the call. For example:
  2391.  
  2392.       timint 3 1000 @ %timer3.
  2393.  
  2394.     The example above sets timer 3 to call the function "timer3" every
  2395.     second.
  2396.  
  2397.     This function returns 1 if success or null if failure.
  2398.  
  2399.  
  2400.   timalm  [timerid]  [year(YYYY)]  [month(MM)]  [day(DD)]
  2401.           [dayofweek (0-6)]  [hour(HH)]  [min(mm)]  [sec(ss)]
  2402.           [obj]  [fun]  [arg 1]  [arg 2] ...
  2403.  
  2404.     Sets an "alarm" timer to call the function [fun] in the object [obj]
  2405.     with arguments [arg 1], [arg 2], etc. The function is called at the
  2406.     specified time and date.
  2407.  
  2408.     If [obj] is null, then the current "event" object is used. The
  2409.     [timerid] can be 0-9, and uniquely identifies the timer.
  2410.  
  2411.     "-1" may be specified as a "wildcard" for any of the date or time
  2412.     parameters. For example:
  2413.                                                     Timer Functions   45
  2414.  
  2415.  
  2416.       timalm  2 -1 3 -1 -1 11 0 0 @ "march".
  2417.  
  2418.     The example above sets timer 2 to call the function "march" in the
  2419.     current event object at 11 o'clock for every day in the month of
  2420.     march.
  2421.  
  2422.     This function returns 1 if success or null if failure.
  2423.  
  2424.  
  2425.   timdes  [timerid].
  2426.  
  2427.     Stops and destroys the timer [timerid]. This function destroys both
  2428.     interval and alarm timers. Returns 1 if success or null if failure.
  2429.  
  2430.  
  2431.   qtim.
  2432.  
  2433.     Returns the date and time as a character string of length 17, with
  2434.     the following format:
  2435.  
  2436.       "YYYYMMDDWhhmmssuu"
  2437.  
  2438.       YYYY - year
  2439.       MM   - month (1-12)
  2440.       DD   - day (1-31)
  2441.       W    - day of the week (0-6, 0=sunday)
  2442.       hh   - hour (0-23)
  2443.       mm   - minutes (0-59)
  2444.       ss   - seconds (0-59)
  2445.       uu   - hundredths of a second (0-99)
  2446.  
  2447.  
  2448.  
  2449.   3-15  Keyboard Functions
  2450.   ────────────────────────
  2451.  
  2452.   Keyboard functions are used to control and return information about
  2453.   the keyboard. Keyboard function names use the prefix "kbd".
  2454.  
  2455.  
  2456.   kbdenh  [0/1].
  2457.  
  2458.     Turns checking for the enhanced keyboard ON (1) or OFF (0). "kbdenh
  2459.     1" enables the enhanced keyboard keys if the enhanced keyboard is
  2460.     detected. "kbdenh 0" disables the enhanced keyboard keys.
  2461.  
  2462.  
  2463.   kbdrpt  [report mode].
  2464.  
  2465.     Determines how the interpreter calls keyboard event handler
  2466.     functions.
  2467.                                                  Keyboard Functions   46
  2468.  
  2469.  
  2470.     If [report mode] is "1" and a key is typed in, the interpreter
  2471.     attempts to call the user function "key" in the current event object
  2472.     with the following arguments:
  2473.  
  2474.       key name - name of the key ("k_s_f1", "k_a_y", etc.)
  2475.       key code - a 2 byte code identifying the key
  2476.       key char - the character typed in (if not a function key)
  2477.  
  2478.     If [report mode] is "2" and a key is typed in, the interpreter
  2479.     attempts to call a user function in the current event object with
  2480.     the same name as the "key name" argument above, with the following
  2481.     arguments:
  2482.  
  2483.       key code - a 2 byte code identifying the key
  2484.       key char - the character typed in (if not a function key)
  2485.  
  2486.     The default keyboard reporting mode is "2". This function returns 1
  2487.     if successful or null if failure.
  2488.  
  2489.  
  2490.   kbdclr.
  2491.  
  2492.     Removes all keystrokes from the keyboard buffer.
  2493.  
  2494.  
  2495.   qkbdshf  [mask].
  2496.  
  2497.      Returns the current shift key state of the keyboard "and-ed
  2498.      bitwise" with the integer specified by [mask]. The following table
  2499.      lists each bit position and its corresponding shift key:
  2500.  
  2501.        01h - right shift key is down    10h - scroll lock is ON
  2502.        02h - left shift key is down     20h - num lock is ON
  2503.        04h - ctrl key is down           40h - caps lock is ON
  2504.        08h - alt key is down            80h - insert state is ON
  2505.  
  2506.      For example, the value of "qkbdshf 3" is non-zero if either shift
  2507.      key is currently pressed down.
  2508.  
  2509.  
  2510.   qkbdchr  [options]  [keycode].
  2511.  
  2512.     This function waits for a key from the keyboard or translates
  2513.     [keycode] if [keycode] is specified. The following options can be
  2514.     specified:
  2515.  
  2516.       n - returns the function name assigned to [keycode].
  2517.       c - returns a keycode (no change if [keycode] is specified).
  2518.       h - returns "1" if a key has been pressed, otherwise it returns
  2519.           null. The key remains in the keyboard buffer.
  2520.  
  2521.                                                  Keyboard Functions   47
  2522.  
  2523.  
  2524.   3-16  Mouse Functions
  2525.   ─────────────────────
  2526.  
  2527.   Mouse functions are used to control and return information about the
  2528.   mouse. Mouse function names use the prefix "mou".
  2529.  
  2530.  
  2531.   mouini.
  2532.  
  2533.     Initializes the mouse and returns the mouse driver version (or null
  2534.     if failure). This function also displays the mouse pointer at the
  2535.     center of the screen, and enables the interpreter event queue to
  2536.     receive mouse events.
  2537.  
  2538.     In order for this function to return successfully, a DOS mouse
  2539.     driver (such as "mouse.com" or "mouse.sys") must be installed before
  2540.     the interpreter is invoked.
  2541.  
  2542.  
  2543.   moutrm.
  2544.  
  2545.     Deactivates the mouse driver and removes the mouse pointer from the
  2546.     screen. No more mouse events will be received by the interpreter
  2547.     event queue. Returns 1 if success or null if failure.
  2548.  
  2549.  
  2550.   mousen  [horz]  [vert]  [double speed].
  2551.  
  2552.     Sets the mouse sensitivity by setting the horizontal mickey-to-pixel
  2553.     [horz] and vertical mickey-to-pixel [vert] ratios, and by setting
  2554.     the double speed threshold [double speed]. The default value of
  2555.     these settings after calling "mouini" are:
  2556.  
  2557.       Horz mickey-to-pixel ratio:   8
  2558.       Vert mickey-to-pixel ratio:  16
  2559.       Double speed threshold:      64
  2560.  
  2561.     Returns 1 if success or null if failure.
  2562.  
  2563.  
  2564.   mourpt  [report mode].
  2565.  
  2566.     Determines how the interpreter calls mouse event handler functions.
  2567.                                                  Keyboard Functions   48
  2568.  
  2569.  
  2570.     If [report mode] is "1" and a mouse event is read from the event
  2571.     queue, the interpreter attempts to call the user function "mouse" in
  2572.     the current event object with the following arguments:
  2573.  
  2574.       mouse event name - name of the mouse event ("m_l_down", etc.)
  2575.       mouse x position - x position of mouse (virtual coordinates)
  2576.       mouse y position - y position of mouse (virtual coordinates)
  2577.  
  2578.     If [report mode] is "2" and a mouse event is read from the event
  2579.     queue, the interpreter attempts to call a user function in the
  2580.     current event object with the same name as the "mouse event name"
  2581.     above, with the following arguments:
  2582.  
  2583.       mouse x position - x position of mouse (virtual coordinates)
  2584.       mouse y position - y position of mouse (virtual coordinates)
  2585.  
  2586.     The default mouse reporting mode is "2". This function returns 1 if
  2587.     successful or null if failure.
  2588.  
  2589.  
  2590.   moupos  [x position]  [y position].
  2591.  
  2592.     Sets the position of the mouse cursor on the physical screen (0,0 is
  2593.     the upper left corner). Returns 1 if success or null if failure.
  2594.  
  2595.  
  2596.   mouvis  [0/1].
  2597.  
  2598.     Shows (1) or hides (0) the mouse cursor.
  2599.  
  2600.  
  2601.   qmoupos  [options].
  2602.  
  2603.     Returns the current mouse position on the physical screen (0,0 is
  2604.     the upper left corner). The following options may be specified:
  2605.  
  2606.       x - return the x position of the mouse
  2607.       y - return the y position of the mouse
  2608.  
  2609.     If no options are specified, the default is "x".
  2610.  
  2611.  
  2612.  
  2613.   3-17  Queue Functions
  2614.   ─────────────────────
  2615.  
  2616.   Queue functions are used to control and return information about the
  2617.   interpreter event queue. Queue function names generally use the prefix
  2618.   "que".
  2619.                                                     Queue Functions   49
  2620.  
  2621.  
  2622.   que  [fun]  [arg 1]  [arg 2] ...
  2623.  
  2624.     Places the function [fun] and its arguments [arg 1], [arg 2],
  2625.     etc. on the interpreter event queue. The next time the interpreter
  2626.     is idle, it will read the event queue and attempt to call [fun] in
  2627.     the current event object. Returns 1 if success or null if failure.
  2628.  
  2629.  
  2630.   send  [fun]  [arg 1]  [arg 2] ...
  2631.  
  2632.     This function is similar to the "que" function above, except that
  2633.     the interpreter event queue is bypassed. The function [fun] in the
  2634.     current event object is called immediately. This function returns
  2635.     the result of evaluating [fun].
  2636.  
  2637.  
  2638.   queobj  [obj]  [fun]  [arg 1]  [arg 2] ...
  2639.  
  2640.     This function works similar to the "que" function above, except that
  2641.     the interpreter attempts to call the function [fun] in the object
  2642.     [obj], not in the current event object.
  2643.  
  2644.  
  2645.   sendobj  [obj]  [fun]  [arg 1]  [arg 2] ...
  2646.  
  2647.     This function is similar to the "queobj" function above, except that
  2648.     the interpreter event queue is bypassed. The function [fun] in the
  2649.     object [obj] is called immediately. This function returns the result
  2650.     of executing the function [fun].
  2651.  
  2652.  
  2653.   quedis.
  2654.  
  2655.     This function reads the next event from the queue and "dispatches"
  2656.     it by calling the user event handler function associated with the
  2657.     event. If there is no event on the event queue, it will wait for an
  2658.     event to appear in the queue. This function returns when the user
  2659.     event handler function returns.
  2660.  
  2661.     If the function "quequi" (see below) is called in the user event
  2662.     handler, this function returns "0", otherwise it returns "1". This
  2663.     feature can be used to implement a dispatch loop which is not
  2664.     terminated until the "quequi" function is called. For example:
  2665.  
  2666.       while (quedis).
  2667.  
  2668.     The loop above will continue to dispatch events from the event queue
  2669.     until a user function calls "quequi".
  2670.                                                     Queue Functions   50
  2671.  
  2672.  
  2673.   quequi.
  2674.  
  2675.     Forces the "quedis" function (see above) to return null.
  2676.  
  2677.  
  2678.   quesiz  [size].
  2679.  
  2680.     Sets the interpreter event queue size to [size] events. The default
  2681.     size is 20 when the interpreter is invoked. Returns 1 if successful
  2682.     or null if failure.
  2683.  
  2684.  
  2685.  
  2686.   3-18  Video Functions
  2687.   ─────────────────────
  2688.  
  2689.   Video functions are used to control and return information about the
  2690.   video device. Video function names use the prefix "vid".
  2691.  
  2692.  
  2693.   vidcsz  [start]  [end].
  2694.  
  2695.     Sets the physical cursor size on the screen. [start] and [end]
  2696.     indicate the distance of the top and bottom of the cursor from the
  2697.     top of the character cell, on a scale of 0 to 100. For example,
  2698.     "vidcsz 0 100" sets the cursor size to the entire character cell.
  2699.  
  2700.     Specifying -1 for both [start] and [end] hides the cursor.
  2701.  
  2702.  
  2703.   vidbli  [0/1].
  2704.  
  2705.     Turns the video blink mode ON (1), or OFF (0). The video blink mode
  2706.     determines whether or not color attributes above 127 blink on and
  2707.     off. The video blink mode is OFF by default.
  2708.  
  2709.  
  2710.   vidfon  [columns]  [rows]  [back attr]  [back fill]  [options].
  2711.  
  2712.     Changes the video mode and/or sets the background color attribute
  2713.     and background fill string. You can do either operation separately
  2714.     or together.
  2715.  
  2716.     If [option] "c" is specified, the screen is captured and restored
  2717.     when exiting the interpreter.
  2718.  
  2719.     When changing the video mode, both [columns] and [rows] must be
  2720.     non-zero. [columns] may be 40 or 80 and [rows] may be 12, 14, 21,
  2721.     25, 28, 43, or 50. If [columns] or [rows] are zero or null, the
  2722.     video mode is not changed.
  2723.                                                     Video Functions   51
  2724.  
  2725.  
  2726.     To change the background attribute or fill string, specify the
  2727.     background color attribute [back attr] and fill string [back fill].
  2728.     If [back attr] is not specified, a value of 0 (black) is used. If
  2729.     [back fill] is not specified, a blank (ascii 32) is used. If neither
  2730.     are specified, the current background remains unchanged.
  2731.  
  2732.     Note: the string [back fill] can be a maximum of 50 chars long.
  2733.  
  2734.     This function returns 1 if successful or null if failure.
  2735.  
  2736.  
  2737.   vidorg  [x]  [y]  [options].
  2738.  
  2739.     Changes the mapping of the physical video device (the screen) to the
  2740.     virtual video device (the virtual screen is 64k x 64k characters).
  2741.     [x] and [y] specify the left and top positions of the physical
  2742.     device within the virtual device. The following [options] may be
  2743.     specified:
  2744.  
  2745.       r - [x] and [y] specify a mapping relative to the current mapping
  2746.       a - [x] and [y] specify an absolute mapping. In this case, [x] and
  2747.           [y] are referred to as "virtual coordinates".
  2748.  
  2749.     For example, "vidorg 12000 17896 %a" maps the top left corner of the
  2750.     screen to (12000, 17896) on the virtual screen.
  2751.  
  2752.     If no [options] are specified, the default option is "r".
  2753.  
  2754.     When the editor is invoked, the default mapping is (16000,16000).
  2755.     This function returns 1 if success or null if failure.
  2756.  
  2757.  
  2758.   vidpri  [string]  [x]  [y]  [attr]  [options]
  2759.  
  2760.     Prints the string [string] on the screen background at position [x],
  2761.     [y] using the color attribute [attr]. The following [options] may be
  2762.     specified:
  2763.  
  2764.       a - [x] and [y] are in absolute virtual screen coordinates.
  2765.       d - [x] and [y] are in physical device coordinates, with (0,0)
  2766.           as the left and top.
  2767.  
  2768.     If no [options] are specified, the default is "d". This function
  2769.     returns 1 if successful or null if failure.
  2770.  
  2771.  
  2772.   vidbor  [attr].
  2773.  
  2774.     Sets the screen overscan border color to [attr].
  2775.                                                     Video Functions   52
  2776.  
  2777.  
  2778.   vidoff.
  2779.  
  2780.     Turns off the video device. All screen updates are deferred until
  2781.     the function "vidon" is called.
  2782.  
  2783.  
  2784.   vidon.
  2785.  
  2786.     Turns on the video device.
  2787.  
  2788.  
  2789.   qvidmon.
  2790.  
  2791.     Returns 1 if the video device is in monochrome mode, otherwise it
  2792.     returns null.
  2793.  
  2794.  
  2795.   qvidp  [options].
  2796.  
  2797.     Returns the video parameter specified in [options]. One of the
  2798.     following [options] may be specified:
  2799.  
  2800.       l - returns the left virtual coordinate of the physical screen
  2801.       t - returns the top virtual coordinate of the physical screen
  2802.       r - returns the right virtual coordinate of the physical screen
  2803.       b - returns the bottom virtual coordinate of the physical screen
  2804.       x - returns the width of the screen
  2805.       y - returns the height of the screen
  2806.       k - returns the video blink mode (0=off, 1=on)
  2807.                                               Text Buffer Functions   53
  2808.  
  2809.  
  2810.   3-19  Text Buffer Functions
  2811.   ───────────────────────────
  2812.  
  2813.   Text buffer functions are used to control and return information about
  2814.   text buffers. A text buffer is a group of one or more lines of text
  2815.   and is used for editing files. There are many functions for creating,
  2816.   modifying, and destroying text buffers. Text buffer function names
  2817.   generally use the prefix "tex".
  2818.  
  2819.   Any number of text buffers can be created. Text buffers are organized
  2820.   into a global "text buffer list". The "default" text buffer is always
  2821.   at the top of the list.
  2822.  
  2823.   Text buffers are identified by a "text buffer name". Specifying a null
  2824.   text buffer name for any of the text buffer functions indicates that
  2825.   the "default" text buffer should be used.
  2826.  
  2827.   Note that changes made to a text buffer with these functions are not
  2828.   automatically displayed in any windows which might be associated with
  2829.   the text buffer. You must use the "windra" or "texdra" functions to
  2830.   update the window (see "Window Functions").
  2831.  
  2832.  
  2833.   texcre  [text buffer]  [line 1]  [line 2] ...
  2834.  
  2835.     Creates a new text buffer with the name [text buffer]. The new text
  2836.     buffer becomes the default text buffer. The arguments [line 1],
  2837.     [line 2], etc are the initial lines to be placed in the text buffer.
  2838.     If no initial lines are specified, the text buffer is created with
  2839.     one blank line.
  2840.  
  2841.     Returns 1 if successful or 0 if failure.
  2842.  
  2843.  
  2844.   texmen  [text buffer]  [line 1]  [line 2] ...
  2845.  
  2846.     Creates a new menu text buffer with the name [text buffer]. The new
  2847.     text buffer becomes the default text buffer. The arguments [line 1],
  2848.     [line 2], etc are the initial lines to place on the menu (see the
  2849.     section "Defining Menus" in The Aurora Editor Users Guide).
  2850.  
  2851.     Returns 1 if successful or 0 if failure.
  2852.  
  2853.  
  2854.   texdes  [text buffer].
  2855.  
  2856.     Destroys [text buffer] and all marks and windows associated with
  2857.     [text buffer]. The previous text buffer becomes the default text
  2858.     buffer. Returns 1 if successful or 0 if failure.
  2859.                                               Text Buffer Functions   54
  2860.  
  2861.  
  2862.   texloa  [text buffer]  [filename]  [options]  [line number]
  2863.           [delimiter]  [trunc length].
  2864.  
  2865.     Creates a new text buffer from the file [filename], or inserts the
  2866.     file [filename] into an existing text buffer. If [filename] contains
  2867.     wildcards or specifies a directory, then a directory listing is
  2868.     loaded. The "qtexdir" function can be used to return information
  2869.     about the directory listing.
  2870.  
  2871.     If [text buffer] does not exist, then a new text buffer with the
  2872.     name [text buffer] is created, and the file [filename] is loaded
  2873.     into it. The new text buffer becomes the default text buffer.
  2874.  
  2875.     If [text buffer] is an existing text buffer, then the file
  2876.     [filename] is inserted into [text buffer] after the line [line
  2877.     number]. If [line number] is 0 then it is inserted before the first
  2878.     line. If [line number] is -1 then it is inserted after the last
  2879.     line.
  2880.  
  2881.     The following [options] may be specified:
  2882.  
  2883.       b - the [delimiter] argument specifies a 1-byte line delimiter
  2884.       w - the [delimiter] argument specifies a 2-byte line delimiter
  2885.       h - include hidden files when loading a directory listing
  2886.       d - include subdirectories when loading a directory listing
  2887.       k - convert file sizes to 1K increments when loading a directory
  2888.           listing
  2889.       a - ignore the argument [filename] and load an internal ascii
  2890.           chart
  2891.  
  2892.     If options "b" or "w" are specified then [delimiter] specifies a
  2893.     byte or word line delimiter used to define the end of each line
  2894.     when loading the file.
  2895.  
  2896.     If options "b" or "w" are not specified and [delimiter] is zero,
  2897.     then the line delimiter defaults to "0D0Ah" (carriage return -
  2898.     linefeed).
  2899.  
  2900.     If options "b" or "w" are not specified and [delimiter] is greater
  2901.     than zero, then [delimiter] specifies the binary line length, and
  2902.     the file is loaded in "binary mode".
  2903.  
  2904.     [trunc length] specifies the maximum line length that can be loaded
  2905.     before wrapping to the next line. The maximum line length can not
  2906.     exceed 16000. If [trunclength] is zero or not specified, then a
  2907.     maximum line length of 16000 is assumed.
  2908.  
  2909.     This function returns 1 if a file was loaded, 2 if a directory
  2910.     listing was loaded, or null if failure.
  2911.                                               Text Buffer Functions   55
  2912.  
  2913.  
  2914.   texnam  [text buffer]  [new text buffer].
  2915.  
  2916.     Renames the text buffer [text buffer] to [new text buffer]. Returns
  2917.     1 if success or null if failure.
  2918.  
  2919.  
  2920.   texdra  [text buffer]  [line number].
  2921.  
  2922.     Draws the client area of all windows which currently display the
  2923.     text buffer [text buffer].
  2924.  
  2925.     If [line number] is specified, only the specified line number is
  2926.     drawn (this is faster than drawing all lines of the text buffer). If
  2927.     [line number] is -1, the line drawn is the line at the default
  2928.     cursor mark for the text buffer.
  2929.  
  2930.     Returns 1 if successful or 0 if failure.
  2931.  
  2932.  
  2933.   textop  [text buffer].
  2934.  
  2935.     Makes the text buffer [text buffer] the default text buffer by
  2936.     moving it to the top of the text buffer list. The default text
  2937.     buffer can be easily referenced in any text buffer function by
  2938.     specifying "null" for the [text buffer] argument.
  2939.  
  2940.  
  2941.   texdty  [text buffer]  [options].
  2942.  
  2943.     Sets or clears the dirty flag for the text buffer [text buffer]. The
  2944.     dirty flag is set automatically by any function which modifies the
  2945.     text buffer, and can be retrieved with the "qtexdty" function (see
  2946.     below). The following options can be specified:
  2947.  
  2948.       c - clear the dirty flag
  2949.       s - set the dirty flag
  2950.  
  2951.     If no options are specified, the default is "s".
  2952.  
  2953.  
  2954.   texdlm  [text buffer]  [delimiter]  [options].
  2955.  
  2956.     Sets the default byte or word line delimiter associated with the
  2957.     text buffer [text buffer]. The following options can be specified:
  2958.  
  2959.       b - [delimiter] is a 1-byte delimiter.
  2960.       w - [delimiter] is a 2-byte delimiter.
  2961.  
  2962.     If no [options] are specified and [delimiter] is non-zero, then
  2963.     [text buffer] will have no delimiter.
  2964.                                               Text Buffer Functions   56
  2965.  
  2966.  
  2967.   texusz  [text buffer]  [size].
  2968.  
  2969.     Sets the size of the undo/redo stack associated with the text buffer
  2970.     [text buffer]. The default size is zero.
  2971.  
  2972.  
  2973.   texovl  [text buffer]  [x]  [y]  [string].
  2974.  
  2975.     Overlays the string [string] at column [x], line [y] of the text
  2976.     buffer [text buffer]. If [x] or [y] are null, then the column and
  2977.     line of the default cursor mark are assumed. Returns 1 if success or
  2978.     null if failure.
  2979.  
  2980.  
  2981.   texinsx  [text buffer]  [x]  [y]  [string].
  2982.  
  2983.     Inserts the string [string] horizontally at column [x], line [y] of
  2984.     the text buffer [text buffer]. If [x] or [y] are null, then the
  2985.     column and line of the default cursor mark are assumed. Returns 1 if
  2986.     success or null if failure.
  2987.  
  2988.  
  2989.   texinsy  [text buffer]  [x]  [y]  [string]  [reps].
  2990.  
  2991.     Inserts the string [string] vertically at column [x] after line [y]
  2992.     of the text buffer [text buffer]. If [x] or [y] are null, then the
  2993.     column and line of the default cursor mark are assumed. [reps]
  2994.     indicates the number of lines to be inserted (if 0 or null is
  2995.     specified, one line is inserted). Returns 1 if success or null
  2996.     if failure.
  2997.  
  2998.  
  2999.   texdelx   [text buffer]  [x]  [y]  [length].
  3000.  
  3001.     Deletes the 1-line text segment of length [length] at column [x],
  3002.     line [y] of the text buffer [text buffer]. If [x] or [y] are null,
  3003.     then the column and line of the default cursor mark are assumed.
  3004.     Returns 1 if success or null if failure.
  3005.  
  3006.  
  3007.   texdely  [text buffer]  [y]  [reps].
  3008.  
  3009.     Deletes [reps] number of lines starting with line [y] in the text
  3010.     buffer [text buffer]. If [reps] is null or zero, then one line is
  3011.     deleted. If [y] is null then the line number of the default cursor
  3012.     mark is assumed. Returns 1 if success or null if failure.
  3013.                                               Text Buffer Functions   57
  3014.  
  3015.  
  3016.   qtex  [text buffer].
  3017.  
  3018.     Returns 1 if the text buffer [text buffer] exists, or null if it
  3019.     does not exist.
  3020.  
  3021.  
  3022.   qtexlin  [text buffer]  [line number]  [a]  [b].
  3023.  
  3024.     Returns a copy of the line [line number] from column [a] through
  3025.     column [b] in the text buffer [text buffer]. If [line number] is
  3026.     null or zero, then the line number of the default cursor mark is
  3027.     assumed. If [a] is null or zero, then "1" is used for [a]. If [b] is
  3028.     null or zero, then the line length used for [b]. This function
  3029.     returns null if failure.
  3030.  
  3031.  
  3032.   qtexend  [text buffer].
  3033.  
  3034.     Returns the number of lines in the text buffer [text buffer].
  3035.  
  3036.  
  3037.   qtexpre  [text buffer].
  3038.  
  3039.     Returns the previous text buffer before [text buffer] in the text
  3040.     buffer list. Returns null if [text buffer] is the last text buffer
  3041.     in the list.
  3042.  
  3043.  
  3044.   qtexdty  [text buffer].
  3045.  
  3046.     Returns 1 if the text buffer [text buffer] has been modified, or
  3047.     null if it has not been modified.
  3048.  
  3049.  
  3050.   qtextru  [text buffer].
  3051.  
  3052.     Returns 1 if the text buffer [text buffer] has been truncated during
  3053.     execution of the function "texloa". This can occur by interrupting
  3054.     "texloa" with <Ctrl-Break>, or when the system is out of space. This
  3055.     function returns null if [text buffer] has not been truncated.
  3056.  
  3057.  
  3058.   qtexbeg  [text buffer]  [line number].
  3059.  
  3060.     Returns the column position of the first non-blank character of line
  3061.     [line number] in the text buffer [text buffer]. If [line number] is
  3062.     zero or null, the line number of the default cursor mark is assumed.
  3063.                                               Text Buffer Functions   58
  3064.  
  3065.  
  3066.   qtexlen  [text buffer]  [line number].
  3067.  
  3068.     Returns the length of line [line number] in the text buffer [text
  3069.     buffer]. If [line number] is zero or null, the line number of the
  3070.     default cursor mark is assumed.
  3071.  
  3072.  
  3073.   qtexfld  [text buffer]  [line number]  [rel]  [options].
  3074.  
  3075.     If [rel] is not specified, this function returns the number of lines
  3076.     in the text fold beginning or ending at the line [line number].
  3077.  
  3078.     If [rel] is specified, the value of [rel] may be a positive or
  3079.     negative integer. The following [options] may also be specified:
  3080.  
  3081.       a - returns the line number that is the "apparent" distance of
  3082.           [rel] lines away from [line number]. The "apparent" distance
  3083.           is the visible distance on the screen (text folds count as one
  3084.           line).
  3085.       v - returns the "apparent" line number that is the actual distance
  3086.           of [rel] lines away from [line number].
  3087.       r - this option can be specified with options "a" or "v". It
  3088.           indicates the relative distance away from [line number] is to
  3089.           be returned, not a line number.
  3090.  
  3091.     If no [options] are specified, the default is "a".
  3092.  
  3093.     If [line number] is zero or null, the line number of the default
  3094.     cursor mark is assumed.
  3095.  
  3096.  
  3097.   qtextop.
  3098.  
  3099.     Returns the default text buffer at the "top" of the text buffer
  3100.     list.
  3101.  
  3102.  
  3103.   qtexmrk  [text buffer]  [options].
  3104.  
  3105.     Returns the default mark or cursor mark at the "top" of the mark
  3106.     list associated with the text buffer [text buffer]. The following
  3107.     [options] may be specified:
  3108.  
  3109.       c - returns the first cursor mark on the mark list
  3110.       m - returns the first non-cursor mark on the mark list
  3111.  
  3112.     If no options are specified, then the first mark on the mark list is
  3113.     returned (cursor mark or non-cursor mark).
  3114.                                               Text Buffer Functions   59
  3115.  
  3116.  
  3117.     Note: if there are any cursor marks associated with the text buffer,
  3118.     the interpreter always places them "ahead" of non-cursor marks on
  3119.     the mark list, so that calling this function with no [options] will
  3120.     always return a cursor mark.
  3121.  
  3122.  
  3123.   qtexbin  [text buffer].
  3124.  
  3125.     Returns the binary line length associated with the text buffer [text
  3126.     buffer]. If [text buffer] was not loaded in "binary mode", then this
  3127.     function returns null.
  3128.  
  3129.  
  3130.   qtexmen  [text buffer]  [line number]  [options].
  3131.  
  3132.     Returns information about the menu text buffer [text buffer] created
  3133.     with the "texmen" function. If [line number] is null or zero, the
  3134.     line number of the default cursor mark is assumed. The following
  3135.     [options] may be specified:
  3136.  
  3137.       c - return the position of the highlight character at [line
  3138.           number]
  3139.       w - return the menu width
  3140.       n - return the menu item description at [line number]
  3141.       f - return the macro code for the menu item at [line number]
  3142.       y - return last cursor position on the menu text buffer
  3143.  
  3144.     (see also "Defining Menus" in The Aurora Editor Users Guide).
  3145.  
  3146.  
  3147.   qtexdir  [options].
  3148.  
  3149.     Returns information about the most recently loaded directory listing
  3150.     loaded with the "texloa" function. The following options may be
  3151.     specified:
  3152.  
  3153.       d - return the number of subdirectories in the directory listing
  3154.       f - return the number of files in the directory listing
  3155.       s - return the sum of all the file sizes in the directory listing
  3156.  
  3157.  
  3158.   undbeg.
  3159.  
  3160.     Marks the beginning of a series of "tex" and "mrk" function calls
  3161.     which are considered to be one "undoable/redoable" operation. The
  3162.     current cursor mark position, and window size and position (if
  3163.     applicable) will be saved with the "undoable" operation.
  3164.                                               Text Buffer Functions   60
  3165.  
  3166.  
  3167.     The "undend" function (see below) marks the end of the "undoable"
  3168.     series of function calls.
  3169.  
  3170.  
  3171.   undend.
  3172.  
  3173.     Marks the end of a series of "tex" and "mrk" function calls started
  3174.     by the "undbeg" function (see above) which are to be considered as
  3175.     one "undoable" operation. All of the information required to "undo"
  3176.     the function calls between "undbeg" and "undend" is pushed onto an
  3177.     internal undo/redo stack.
  3178.  
  3179.  
  3180.   und  [text buffer]  [options].
  3181.  
  3182.     Restores the most recent changes made to the text buffer [text
  3183.     buffer] that were recorded with the "undbeg" and "undend" functions
  3184.     (see above). The following options may be specified:
  3185.  
  3186.       u - restores the most recent modification to the text buffer
  3187.       r - reverses the effects of the last "und %u" function call
  3188.  
  3189.     If no [options] are specified, the default is "u". This function
  3190.     returns 1 if success or null if failure.
  3191.                                                      Mark Functions   61
  3192.  
  3193.  
  3194.   3-20  Mark Functions
  3195.   ────────────────────
  3196.  
  3197.   Mark functions are used to control and return information about
  3198.   "marks". A mark defines an area of text within a specific text buffer,
  3199.   or specifies a "cursor" position in a text buffer. There are many
  3200.   functions for creating, modifying, and destroying marks. Mark function
  3201.   names use the prefix "mrk".
  3202.  
  3203.   Any number of marks can be associated with a text buffer. Marks are
  3204.   organized into a "mark list" attached to the text buffer. The
  3205.   "default" mark is at the top of the list.
  3206.  
  3207.   Marks are identified by a "mark name". Specifying a null mark name for
  3208.   any of the mark functions indicates that the default mark should be
  3209.   used.
  3210.  
  3211.   Using the mark functions, operations on text buffers can be restricted
  3212.   to the areas of text defined by the marks. "Cursor marks" are a
  3213.   special type of mark used to specify movable cursor positions within a
  3214.   text buffer. A Window can be attached to a text buffer via cursor
  3215.   marks (see "Window Functions").
  3216.  
  3217.   Note that changes made to a text buffer with these functions are not
  3218.   automatically displayed in any windows associated with the text
  3219.   buffer. You must use the "windra" or "texdra" functions to update the
  3220.   window (see "Text Buffer Functions" and "Window Functions").
  3221.  
  3222.  
  3223.   mrkset  [mark]  [options]  [text buffer]  [l]  [t]  [r]  [b]
  3224.           [s]  [e].
  3225.  
  3226.     Creates a new mark with the name [mark] for the text buffer [text
  3227.     buffer], or modifies the mark if it already exists. If a new
  3228.     "cursor" mark is created, it becomes the default mark for the text
  3229.     buffer. Cursor marks are always placed ahead of non-cursor marks on
  3230.     text buffer's mark list.
  3231.  
  3232.     [l], [t], [r], [b] are the left, top, right, and bottom coordinates
  3233.     of the mark, relative to the top-left corner of the text buffer. [s]
  3234.     and [e] are the start and end positions on the first and last lines
  3235.     of the mark. [s] and [e] are currently used only by the "mrkfin"
  3236.     function.
  3237.  
  3238.     If [l] or [t] are null or zero, then the column and line of the
  3239.     default cursor mark in the text buffer are used. If [r] or [b] are
  3240.     null or zero, then [l] and [t] are used. If [s] or [e] are null or
  3241.     zero, then the left and right boundaries of the resulting mark are
  3242.     used.
  3243.                                                      Mark Functions   62
  3244.  
  3245.  
  3246.     The following [options] can be specified:
  3247.  
  3248.       c - the mark is a "cursor" mark, used to mark a movable position
  3249.           in a text buffer. The cursor mark becomes the default mark for
  3250.           the text buffer
  3251.       i - places the mark in "insert" mode if it is a cursor mark. If
  3252.           this option is not specified, the cursor mark is placed in
  3253.           "overlay" mode.
  3254.       r - the mark is a rectangular or "column" mark. If this option is
  3255.           not specified, the mark is a "line" mark.
  3256.       h - the mark is "hidden"
  3257.  
  3258.     This function returns 1 if success or null if failure.
  3259.  
  3260.  
  3261.   mrkdes  [mark].
  3262.  
  3263.     Destroys the mark [mark]. If [mark] was the default mark, then the
  3264.     previous mark in the mark list becomes the default mark. Returns 1
  3265.     if success or null if failure.
  3266.  
  3267.  
  3268.   mrknam  [mark]  [new mark].
  3269.  
  3270.     Renames the mark [mark] to [new mark]. Returns 1 if success or null
  3271.     if failure.
  3272.  
  3273.  
  3274.   mrktop  [mark].
  3275.  
  3276.     Makes the cursor mark [mark] the default mark by moving it to the
  3277.     top of the mark list. A non-cursor mark can only be made the default
  3278.     mark if no cursor mark exists for the text buffer.
  3279.  
  3280.  
  3281.   mrkcol  [mark]  [attr].
  3282.  
  3283.     Changes the display color for the mark [mark] to [attr]. If this
  3284.     function is not called, then the mark color is determined by the
  3285.     "wincol" function (see "Window Functions"). This call allows marks
  3286.     to have different colors. Returns 1 if success or null if failure.
  3287.  
  3288.  
  3289.   mrkdel  [mark].
  3290.  
  3291.     Deletes the text inside the mark [mark], and the mark itself. For
  3292.     "line" marks, this function deletes all lines in the mark. For
  3293.     rectangular or "column" marks, this function deletes all columns in
  3294.     the mark and shifts all columns to the right into the vacated area.
  3295.  
  3296.     Returns 1 if success or null if failure.
  3297.                                                      Mark Functions   63
  3298.  
  3299.  
  3300.   mrkins  [mark]  [text buffer]  [x]  [y].
  3301.  
  3302.     Copies the text inside the mark [mark] to column [x] line [y] in the
  3303.     text buffer [text buffer].
  3304.  
  3305.     If [text buffer] is not specified, then the text buffer associated
  3306.     with [mark] is assumed. If [x] or [y] is not specified, then the
  3307.     column and line of the default cursor mark for the text buffer are
  3308.     assumed.
  3309.  
  3310.     For "line" marks, the new text is inserted vertically into [text
  3311.     buffer] after line [y]. For rectangular or "column" marks the new
  3312.     text is inserted horizontally into [text buffer] at column [x], line
  3313.     [y].
  3314.  
  3315.     Returns 1 if success or null if failure.
  3316.  
  3317.  
  3318.   mrkmov  [mark]  [text buffer]  [x]  [y].
  3319.  
  3320.     Moves the text inside the mark [mark] to column [x] line [y] in the
  3321.     text buffer [text buffer]. The mark itself is moved along with the
  3322.     text.
  3323.  
  3324.     If [text buffer] is not specified, then the text buffer associated
  3325.     with [mark] is assumed. If [x] or [y] is not specified, then the
  3326.     column and line of the default cursor mark for the text buffer are
  3327.     assumed.
  3328.  
  3329.     For "line" marks, the text is moved vertically into [text buffer]
  3330.     after line [y]. For rectangular or "column" marks the text is moved
  3331.     horizontally into [text buffer] at column [x], line [y].
  3332.  
  3333.     Returns 1 if success or null if failure.
  3334.  
  3335.  
  3336.   mrkovl  [mark]  [text buffer]  [x]  [y].
  3337.  
  3338.     Overlays the text inside the mark [mark] at column [x] line [y] in
  3339.     the text buffer [text buffer].
  3340.  
  3341.     If [text buffer] is not specified, then the text buffer associated
  3342.     with [mark] is assumed. If [x] or [y] is not specified, then the
  3343.     column and line of the default cursor mark for the text buffer are
  3344.     assumed.
  3345.  
  3346.     Returns 1 if success or null if failure.
  3347.                                                      Mark Functions   64
  3348.  
  3349.  
  3350.   mrkshf  [mark]  [shift]  [fill character].
  3351.  
  3352.     Shifts the text in the mark [mark] left or right by [shift] columns
  3353.     and fills the vacated columns with [fill character]. If the value of
  3354.     [shift] is negative, then the text is shifted left, otherwise the
  3355.     text is shifted right. If [fill character] is null then blanks are
  3356.     used. Returns 1 if success or null if failure.
  3357.  
  3358.  
  3359.   mrkfil  [mark]  [fillchar]  [a]  [b].
  3360.  
  3361.     Fills the text within the mark [mark] with the character [fill
  3362.     character]. If the mark is a "line" mark, then [a] and [b] are used
  3363.     as the left and right columns for the fill. [a] and [b] are ignored
  3364.     for "column" marks.
  3365.  
  3366.     Returns 1 if success or null if failure.
  3367.  
  3368.  
  3369.   mrkcas  [mark]  [options]  [a]  [b].
  3370.  
  3371.     Changes the case of the text within the mark [mark]. If the mark is
  3372.     a "line" mark, then [a] and [b] are used as the left and right
  3373.     columns for the case change. [a] and [b] are ignored for "column"
  3374.     marks. The following [options] can be specified:
  3375.  
  3376.       l - change the text to lower case
  3377.       u - change the text to upper case
  3378.  
  3379.     Specifying both options "l" and "u" will toggle the case of each
  3380.     character in the text. If no [options] are specified, the default is
  3381.     "u".
  3382.  
  3383.     This function returns 1 if success or null if failure.
  3384.  
  3385.  
  3386.   mrkjus  [mark]  [options]  [a]  [b].
  3387.  
  3388.     Right justifies, centers, or left justifies the text within the mark
  3389.     [mark]. If the mark is a "line" mark, then [a] and [b] are used as
  3390.     the left and right columns for the justification. [a] and [b] are
  3391.     ignored for "column" marks. The following [options] can be
  3392.     specified:
  3393.  
  3394.       l - left justifies the text in the mark
  3395.       c - centers the text in the mark
  3396.       r - right justifies the text in the mark
  3397.  
  3398.     If no [options] are specified, the default is "l". This function
  3399.     returns 1 if success or null if failure.
  3400.                                                      Mark Functions   65
  3401.  
  3402.  
  3403.   mrksrt  [mark]  [options].
  3404.  
  3405.     Sorts the lines in the mark [mark]. All portions of each line are
  3406.     included in the sort, even if the mark is a "column" mark. The
  3407.     portion of each line within the mark is the sort key. The following
  3408.     options may be specified:
  3409.  
  3410.       a - ascending sort
  3411.       d - descending sort
  3412.       i - ignore case when sorting
  3413.  
  3414.     If no [options] are specified, then the default is "a". This
  3415.     function returns 1 if success or null if failure.
  3416.  
  3417.  
  3418.   mrktab  [mark]  [tab width].
  3419.  
  3420.     Expands any tab characters (ascii 9) in the mark [mark]. If the mark
  3421.     is a "column" mark, the left and right edges the mark are ignored.
  3422.     [tab width] determines how much each tab character is expanded. [tab
  3423.     width] may be 2, 4 or 8.
  3424.  
  3425.     Returns 1 if success or null if failure.
  3426.  
  3427.  
  3428.   mrkrfl  [mark]  [text buffer]  [l]  [t]  [r]  [options]  [indent].
  3429.  
  3430.     Reflows the lines in the mark [mark]. All the text within each line
  3431.     is reflowed, even if the mark is a "column" mark. The reflowed text
  3432.     is inserted into the text buffer [text buffer] after line [t]. The
  3433.     original text within the mark remains unchanged. The reflowed text
  3434.     is formatted to fit between columns [l] and [r] in [text buffer].
  3435.     [indent] specifies the number of columns to indent the first line of
  3436.     the reflowed text.
  3437.  
  3438.     If [text buffer] has been loaded in "binary mode", it cannot be
  3439.     reflowed.
  3440.  
  3441.     If [text buffer] is not specified, then the text buffer of the
  3442.     default cursor mark is assumed. If [l], [t], or [r] are not
  3443.     specified, then the column and line of the default cursor mark are
  3444.     assumed.
  3445.  
  3446.     The following [options] may be specified:
  3447.  
  3448.       b - blank lines are preserved.
  3449.       r - justifies the reflowed text on both the left and right
  3450.           boundaries.
  3451.  
  3452.     This function returns the number of lines inserted in [text buffer],
  3453.     or null if failure.
  3454.                                                      Mark Functions   66
  3455.  
  3456.  
  3457.   mrksav  [mark]  [filename]  [options]  [delimiter]  [header]  [prtini].
  3458.  
  3459.     Saves the text within mark [mark] to the file [filename]. Specifying
  3460.     a filename such as PRN, LPT1, LPT2, etc. prints the text within the
  3461.     mark. The following [options] may be specified:
  3462.  
  3463.       a - the text is appended to [filename]
  3464.       b - the argument [delimiter] specifies a byte delimiter to be
  3465.           saved after each line.
  3466.       w - the argument [delimiter] specifies a word delimiter to be
  3467.           saved after each line.
  3468.       f - each line is saved without a delimiter.
  3469.       p - specifies that the saved file is to be formatted for printing
  3470.           using the print settings specified with the "sysprt" function,
  3471.           called before this function.
  3472.       i - specifies that only the string [prtini] is to be saved. The
  3473.           text within the mark is ignored. This can be used to send an
  3474.           initialization string to the printer.
  3475.       z - saves an end-of-file (ascii 26) character at the end of
  3476.           [filename]. If option "p" is specified, then a formfeed
  3477.           character (ascii 12) is sent to the printer when printing is
  3478.           completed.
  3479.  
  3480.     If [delimiter] is not specified, the delimiter associated with the
  3481.     mark's text buffer is used (text buffers loaded in binary mode have
  3482.     no delimiter).
  3483.  
  3484.     When option "p" is specified, the argument [header] can be used to
  3485.     print a header and/or footer string. The "sysprt" function must be
  3486.     called before this function and must specify the header or footer
  3487.     options.
  3488.  
  3489.     This function returns 1 if success or null if failure.
  3490.  
  3491.  
  3492.   mrkfin  [mark]  [search string]  [replace string]  [options]
  3493.           [cursor mark].
  3494.  
  3495.     Searches the text within the mark [mark] for [search string]. If
  3496.     [replace string] is specified, then [search string] is replaced with
  3497.     [replace string]. If the cursor mark [cursor mark] is specified and
  3498.     the search string is found, then the cursor mark is moved to the
  3499.     location where the search string was found.
  3500.  
  3501.     The following [options] may be specified:
  3502.  
  3503.       i - ignore case during the search
  3504.       r - search in "reverse" from the bottom to the top of the mark
  3505.                                                      Mark Functions   67
  3506.  
  3507.  
  3508.       a - replace all occurrences of [search string] with [replace
  3509.           string]
  3510.       w - search for "whole words" only
  3511.       x - search for the first character which also occurs in the search
  3512.           string
  3513.       y - search for the first character which does not occur in the
  3514.           search string
  3515.       z - force replace, even if the replace string is null
  3516.  
  3517.     If [replace string] or option "z" was specified, the number of
  3518.     replacements is returned, otherwise the column where the search
  3519.     string was found is returned. If nothing was found then null is
  3520.     returned.
  3521.  
  3522.  
  3523.   mrkrel  [mark]  [x]  [y]  [options]  [text buffer].
  3524.  
  3525.     Relocates the mark [mark] to a new location in the text buffer [text
  3526.     buffer]. If no text buffer is specified, then the text buffer
  3527.     associated with [mark] is assumed. The following [options] may be
  3528.     specified:
  3529.  
  3530.       a - [x] and [y] specify an absolute column and line position in
  3531.           the text buffer
  3532.       r - [x] and [y] specify a relative offset from the current left
  3533.           and top coordinates of [mark].
  3534.  
  3535.     If no [options] are specified, then "r" is assumed. This function
  3536.     returns 1 if success or null if failure.
  3537.  
  3538.  
  3539.   mrkfld  [mark]  [options].
  3540.  
  3541.     Folds or unfolds the lines of text contained within the mark [mark].
  3542.     The following [options] may be specified:
  3543.  
  3544.       f - creates a new text fold containing all lines within the mark.
  3545.       u - removes text folds contained within the mark. If option "a" is
  3546.           not specified, only "top-level" text folds are removed.
  3547.       a - removes all text folds contained within the mark when
  3548.           specified with the option "u".
  3549.  
  3550.     If options "u" and "f" are both specified, existing text folds are
  3551.     removed before the new text fold is created.
  3552.  
  3553.     If no [options] are specified, then "f" is assumed. This function
  3554.     returns 1 if success or null if failure.
  3555.                                                      Mark Functions   68
  3556.  
  3557.  
  3558.   qmrk  [mark].
  3559.  
  3560.     Returns 1 if the mark [mark] exists, or null if it does not exist.
  3561.  
  3562.  
  3563.   qmrkpre  [mark]  [options].
  3564.  
  3565.     Returns a previous mark before [mark] in the mark list. The
  3566.     following [options] may be specified:
  3567.  
  3568.       c - return the previous cursor mark before [mark]
  3569.       m - return the previous non-cursor mark before [mark]
  3570.  
  3571.     If no [options] are specified, then the previous mark (cursor or
  3572.     non-cursor) is returned. This function returns null if no previous
  3573.     mark is found.
  3574.  
  3575.  
  3576.   qmrktex  [mark].
  3577.  
  3578.     Returns the text buffer in which the mark [mark] is located.
  3579.  
  3580.  
  3581.   qmrkp    [mark]  [options].
  3582.  
  3583.     Returns a coordinate of the mark [mark], or the width or height of
  3584.     the mark [mark]. The following [options] may be specified:
  3585.  
  3586.       l - returns the left-most column of the mark
  3587.       t - returns the top line number of the mark
  3588.       r - returns the right-most column of the mark
  3589.       b - returns the bottom line number of the mark
  3590.  
  3591.       x - returns the width of the mark
  3592.       y - returns the height of the mark
  3593.  
  3594.  
  3595.   qmrkcol  [mark].
  3596.  
  3597.     Returns the column position of the cursor mark [mark].
  3598.  
  3599.  
  3600.   qmrklin  [mark].
  3601.  
  3602.     Returns the line number of the cursor mark [mark].
  3603.                                                      Mark Functions   69
  3604.  
  3605.  
  3606.   qmrkins  [mark].
  3607.  
  3608.     Returns the "insert mode" of the cursor mark [mark]. Returns "i" if
  3609.     the cursor mark is in insert mode, or "o" if the cursor mark is in
  3610.     overlay mode.
  3611.  
  3612.  
  3613.   qmrktyp  [mark].
  3614.  
  3615.     Returns "l" if [mark] is a "line" mark, or "r" if [mark] is a
  3616.     rectangular or "column" mark.
  3617.  
  3618.  
  3619.   qmrkbuf  [mark].
  3620.  
  3621.     Returns a string composed of the text within the "column" mark
  3622.     [mark]. This function is ignored for "line" marks.
  3623.  
  3624.     This function will return null if the area of the column mark
  3625.     exceeds 16000.
  3626.  
  3627.  
  3628.   qmrkwin  [mark].
  3629.  
  3630.     Returns the window name associated with the cursor mark [mark].
  3631.                                                    Window Functions   70
  3632.  
  3633.  
  3634.   3-21  Window Functions
  3635.   ──────────────────────
  3636.  
  3637.   Window functions are used to control and return information about
  3638.   windows. A window is a rectangular area of the screen which can used
  3639.   to display text buffers and marks, or to display other "child"
  3640.   windows. Window function names use the prefix "win".
  3641.  
  3642.   Any number of windows can be created. Windows are organized into a
  3643.   global "window list". The "default" window is at the top of the list.
  3644.  
  3645.   Windows are identified by a "window name". Specifying a null window
  3646.   name for any of the window functions indicates that the default window
  3647.   should be used.
  3648.  
  3649.   To display a text buffer in a window, the window must be attached to a
  3650.   cursor mark associated with the text buffer. Since a text buffer may
  3651.   have any number of cursor marks, any number of windows can used to
  3652.   display different areas of the same text buffer.
  3653.  
  3654.   Note that most window functions will not actually update windows on
  3655.   the screen, unless the function description explicitly specifies that
  3656.   they do. In this case, you must use the "windra" or "texdra" functions
  3657.   to update the window (see also "Text Buffer Functions").
  3658.  
  3659.  
  3660.   winset  [window]  [options].
  3661.  
  3662.     Creates a new window with the name [window], or hides/shows an
  3663.     existing window. The following [options] may be specified:
  3664.  
  3665.       h - hide the window
  3666.       d - show the window
  3667.  
  3668.     Windows can be created as "hidden". For example:
  3669.  
  3670.       winset "abc" %h.   // creates the hidden window "abc"
  3671.  
  3672.     If no [options] are specified, the default is "d". This function
  3673.     returns 1 if success of null if failure.
  3674.  
  3675.  
  3676.   windes  [window].
  3677.  
  3678.     Destroys the window [window] and removes it from the screen. Returns
  3679.     1 if success or null if failure.
  3680.                                                    Window Functions   71
  3681.  
  3682.  
  3683.   winnam  [window]  [new window].
  3684.  
  3685.     Renames the window [window] to [new window]. Returns 1 if success or
  3686.     null if failure.
  3687.  
  3688.  
  3689.   winttl  [window]  [title]  [options]  [title id].
  3690.  
  3691.     Sets a window title to the string [title] for the window [window].
  3692.     Each window can have up to 5 titles. The argument [title id]
  3693.     specifies which title is being set. [title id] can be 1 - 5 (if the
  3694.     title id is zero, null, or not specified, then "1" is assumed). Any
  3695.     combination of the following [options] can be specified:
  3696.  
  3697.       n - sets the title on north title bar.
  3698.       s - sets the title on south title bar.
  3699.       e - sets the title on east title bar.
  3700.       w - sets the title on west title bar.
  3701.  
  3702.       l - the title is left-justified in the title bar.
  3703.       c - the title is centered in the title bar.
  3704.       r - the title is right-justified in the title bar.
  3705.  
  3706.       d - draws the window title bar containing the title immediately
  3707.           after setting the title. "windra" is not needed.
  3708.  
  3709.       x - sets the title to the "default status line". The default
  3710.           status line has the following format:
  3711.  
  3712.              [HH]  C XXXXX L YYYYY of TTTTT
  3713.  
  3714.           The status line displays information about the text buffer
  3715.           associated with the window (if any). [HH] is the hex value of
  3716.           the character at the cursor, XXXXX and YYYYY are the column
  3717.           and line positions of the cursor mark, and TTTTT is the total
  3718.           number of lines in the text buffer.
  3719.  
  3720.       h - checks for the highlight character "&". Specifying "&" before
  3721.           a character in the title indicates that it is to be
  3722.           highlighted when displayed. The "&" character itself is not
  3723.           displayed.
  3724.  
  3725.       1 - the title is not padded with any spaces (left or right).
  3726.           Normally the title is padded with one space if it is left of
  3727.           right justified.
  3728.  
  3729.       z - hides the title. This can be used to specify a title for the
  3730.           end-of-text line (see the "wineot" function).
  3731.  
  3732.     This function returns 1 if success or null if failure.
  3733.                                                    Window Functions   72
  3734.  
  3735.  
  3736.   wineot  [window]  [title id].
  3737.  
  3738.     Sets the "end-of-text" line for the window [window] to the window
  3739.     title [title id] which was previously set with the "winttl" function
  3740.     (see above). The title should be hidden with option "z" when calling
  3741.     the winttl function.
  3742.  
  3743.     If [title id] is -1, then the following default end-of-text line is
  3744.     used: "≡≡≡≡≡≡ End of Text ≡≡≡≡≡≡".
  3745.  
  3746.  
  3747.   winmen  [window]  [menu bar id]  [item 1]  [item 2] ...
  3748.  
  3749.     Defines a menu bar for the window [window]. Up to five menu bars can
  3750.     be defined for one window. [item 1], [item 2], etc. are the items to
  3751.     be placed on the menu bar. [menu bar id] specifies which of the five
  3752.     menu bars is being defined, and can be any of the following values:
  3753.  
  3754.       0 - the primary menu bar at the top of the window, under the
  3755.           north title bar (if any)
  3756.       1 - menu bar 1 underneath the primary menu bar
  3757.       2 - menu bar 2 underneath menu bar 1
  3758.       3 - menu bar 3 at the bottom of the window, above the south
  3759.           title bar (if any)
  3760.       4 - vertical menu bar 4 at the left edge of the client area
  3761.  
  3762.     Each menu bar item may contain one ampersand character (&) which is
  3763.     not displayed, but indicates that the character following it is to
  3764.     be highlighted when displayed.
  3765.  
  3766.     This function returns 1 if success or null if failure.
  3767.  
  3768.  
  3769.   winmeh  [window]  [menu bar id]  [item number].
  3770.  
  3771.     Highlights or un-highlights the menu bar item [item number] on
  3772.     menu bar [menu bar id] on the window [window]. There can only be one
  3773.     highlighted item per menu bar. [item number] is the relative
  3774.     position of the menu bar item from the beginning of the menu bar (1
  3775.     for first item, 2 for the second, and so on).
  3776.  
  3777.     If [item number] is null or zero, then the highlight is removed from
  3778.     any currently highlighted item in the menu bar.
  3779.  
  3780.     This function returns the offset (in character positions) of the
  3781.     specified menu item from the beginning of the menu bar, or null if
  3782.     failure.
  3783.                                                    Window Functions   73
  3784.  
  3785.  
  3786.   wintic  [window]  [char]  [attr]  [char]  [attr] ...
  3787.  
  3788.     Defines one-character title bar icon controls for the window
  3789.     [window]. [char] specifies the character to be displayed for each
  3790.     control and [attr] specifies the color attribute of each control. If
  3791.     [attr] is null, then the default window control color is used.
  3792.  
  3793.     Controls are normally left-justified on the title bar. If any
  3794.     control is preceded by an (@) character, then that control and any
  3795.     controls following it will be right justified on the title bar. For
  3796.     example:
  3797.  
  3798.       wintic @ "≡" @ "@" @ "".
  3799.  
  3800.     In the example above, title bar controls are defined for the default
  3801.     window using the default control colors. The control "≡" is left
  3802.     justified, while the controls "" and "" are right justified.
  3803.  
  3804.     This function returns 1 if success or null if failure.
  3805.  
  3806.  
  3807.   windra  [window]  [options]  [line number].
  3808.  
  3809.     Draws the window components specified by [options]. [line number] is
  3810.     ignored for all options except the "l" and "a" options. Any
  3811.     combination of the following [options] may be specified:
  3812.  
  3813.       b - draws the window border
  3814.       p - draws the primary menu bar only
  3815.       m - draws all window menu bars
  3816.       w - draws the west title bar
  3817.       n - draws the north title bar
  3818.       e - draws the east title bar
  3819.       s - draws the south title bar
  3820.       h - draws the horizontal scroll bar
  3821.       v - draws the vertical scroll bar
  3822.       l - draws the line [line number] in the window. If this option is
  3823.           specified and [line number] is null or zero, then the line
  3824.           number of the default cursor mark is assumed.
  3825.       t - draws the client area of the window
  3826.       a - draws the client area of all windows with the same text buffer
  3827.           as [window]. If [line number] is specified, then only
  3828.           the specified line is drawn.
  3829.       c - draws the cursor
  3830.       u - draws the cursor and updates the client area if needed
  3831.       f - draws the frame (every part of the window except the client
  3832.           area)
  3833.                                                    Window Functions   74
  3834.  
  3835.  
  3836.     This function returns 1 if success or null if failure. If option "c"
  3837.     is specified, and the client area needs updating, then 2 is
  3838.     returned.
  3839.  
  3840.  
  3841.   winmrk  [window]  [mark].
  3842.  
  3843.     Associates the cursor mark [mark] with the window [window]. Only one
  3844.     cursor mark may be associated with a window at one time. The window
  3845.     will display the text buffer associated with the cursor mark.
  3846.     Windows that are not associated with a text buffer (such as message
  3847.     boxes or dialog box windows) do not need to use this call. This
  3848.     function returns 1 if success or null if failure.
  3849.  
  3850.  
  3851.   winpar  [parent]  [child].
  3852.  
  3853.     Makes the window [parent] the "parent" window of the window [child].
  3854.  
  3855.  
  3856.   winnex  [window 1]  [window 2].
  3857.  
  3858.     Changes the order of the windows on the screen by placing [window 2]
  3859.     on top of [window 1].
  3860.  
  3861.  
  3862.   winpre  [window 1]  [window 2].
  3863.  
  3864.     Changes the order of the windows on the screen by placing [window 1]
  3865.     on top of [window 2].
  3866.  
  3867.  
  3868.   winvib  [window].
  3869.  
  3870.     Creates a local video buffer for the window [window]. This is only
  3871.     needed for windows that have child windows (such as dialog boxes).
  3872.     Creating a local video buffer for the parent window will eliminate
  3873.     screen flicker when moving the window. Returns 1 if success or null
  3874.     if failure.
  3875.  
  3876.  
  3877.   wincol  [window]  [element]  [attr]  [element]  [attr] ...
  3878.  
  3879.     Sets the colors of specific window elements for the window [window].
  3880.     [element] is a one character code specifying a part of the window,
  3881.     and can be one of the following:
  3882.                                                    Window Functions   75
  3883.  
  3884.  
  3885.       b - border
  3886.       e - border corner
  3887.       0 - north title bar
  3888.       1 - south title bar
  3889.       c - window title bar controls (default color)
  3890.       m - menus
  3891.       i - menu character highlight
  3892.       x - menu bar item highlight
  3893.       d - menu disable
  3894.       s - scroll bars
  3895.       z - end-of-text line
  3896.       t - text or client area
  3897.       h - mark (default color)
  3898.       f - text folds
  3899.  
  3900.     [attr] is the color attribute (0-255). Using negative values from -1
  3901.     to -6 for [attr] have a special meaning:
  3902.  
  3903.       -1 - do not change the current value of this attribute
  3904.       -2 - use the default value for this attribute
  3905.       -3 - increment the value of this attribute
  3906.       -4 - decrement the value of this attribute
  3907.       -5 - increment the background color for this attribute
  3908.       -6 - decrement the background color for this attribute
  3909.  
  3910.  
  3911.   winbor  [window]  [x]  [y]  [xo]  [yo]  [options].
  3912.  
  3913.     Sets the border for the window [window]. [x] is the thickness for
  3914.     the left and right borders. [y] is the thickness for the top and
  3915.     bottom borders. [xo] and [yo] are the amount of horizontal and
  3916.     vertical overlap on the border corners. The following [options] are
  3917.     available:
  3918.  
  3919.       i - 3D inward effect
  3920.       o - 3D outward effect
  3921.       s - changes the size of other parts of the window to accommodate
  3922.           the new border sizes. If this option is not specified, the
  3923.           entire window may grow or shrink.
  3924.  
  3925.     For the following [options], the borders are drawn using the text
  3926.     graphics characters. [x], [y], [xo], and [yo] are ignored, the
  3927.     horizontal and vertical border thickness is always 1, and there is
  3928.     no overlap on the border corners:
  3929.  
  3930.       1 - single line
  3931.       2 - double horizontal
  3932.       3 - double vertical
  3933.       4 - double line
  3934.       5 - solid
  3935.       6 - blank
  3936.                                                    Window Functions   76
  3937.  
  3938.  
  3939.   winfra  [window]  [options]  [west title width]  [east title width]
  3940.           [west menu width]  [control location].
  3941.  
  3942.     Defines the window frame components to be displayed for the window
  3943.     [window]. [options] determine which window frame components are
  3944.     displayed. You can choose any combination of the following options:
  3945.  
  3946.       b - borders
  3947.       m - primary menu
  3948.       w - west title bar
  3949.       n - north title bar
  3950.       e - east title bar
  3951.       s - south title bar
  3952.       h - horizontal scroll bar
  3953.       v - vertical scroll bar
  3954.       1 - menu bar 1
  3955.       2 - menu bar 2
  3956.       3 - menu bar 3 (south)
  3957.       4 - menu bar 4 (west)
  3958.       z - south title controls
  3959.       > - place north title bar in the window border
  3960.  
  3961.       + - add specified options to existing window
  3962.       - - remove specified options from existing window
  3963.  
  3964.  
  3965.     The following arguments to "winfra" can also be specified:
  3966.  
  3967.       [west title width] - the width of the west title (if present)
  3968.       [east title width] - the width of the east title (if present)
  3969.       [west menu width]  - the width of the west menu bar (if present)
  3970.       [control location] - the location of the window title bar controls
  3971.                            (n=north title bar, s=south title bar)
  3972.  
  3973.  
  3974.   winshd  [window]  [bot]  [right]  [bot indent]  [right indent].
  3975.  
  3976.     Adds or removes the shadow on the right and bottom sides of the
  3977.     window [window]. [bot] and [right] specify the shadow thickness on
  3978.     the bottom and right borders. If [bot] and [right] are zero or null,
  3979.     the shadow is removed. [bot lead] and [right lead] specify the
  3980.     amount of indentation for the bottom and right shadows. Returns 1 if
  3981.     success or null if failure.
  3982.  
  3983.  
  3984.   winsh2  [window]  [attr]  [bot indent]  [right indent]
  3985.  
  3986.     Adds or removes a one-half width shadow on the right and bottom
  3987.     sides of the window [window]. This function is intended for use with
  3988.                                                    Window Functions   77
  3989.  
  3990.  
  3991.     stationary windows on a blank background (such as dialog box
  3992.     controls). [attr] is the shadow color. [bot lead] and [right lead]
  3993.     specify the amount of indentation for the bottom and right shadows.
  3994.     Returns 1 if success or null if failure.
  3995.  
  3996.  
  3997.   winscr  [window]  [x]  [y]  [options]  [reps].
  3998.  
  3999.     Scrolls the text buffer displayed in the window [window] to the
  4000.     position [x], [y]. The following [options] can be specified:
  4001.  
  4002.       r - [x] and [y] are relative to the current position (default)
  4003.       a - [x] and [y] designate the absolute column and line number
  4004.           to scroll to.
  4005.       d - the window contents are redrawn immediately after each scroll.
  4006.           There is no need to call "windra" or "texdra".
  4007.       c - the window cursor mark (if any) is moved to same extent that
  4008.           the window is scrolled.
  4009.       p - [y] is ignored and the window is scrolled up or down by the
  4010.           window height minus one line. If [y] is less than zero, the
  4011.           window is scrolled up. If [y] is greater than zero, the window
  4012.           is scrolled down.
  4013.  
  4014.     Note that this function will only redraw the window contents if the
  4015.     "d" option is specified. If the "d" option is not specified, use the
  4016.     "windra" and "texdra" functions to redraw.
  4017.  
  4018.     [reps] specifies the amount of scroll "repetitions" to occur (the
  4019.     default is 1). A value of [reps] greater than 1 used with the "d"
  4020.     option can provide for a "smooth scroll" effect.
  4021.  
  4022.     This function returns 1 if success or null if failure.
  4023.  
  4024.  
  4025.   winadj  [window]  [x]  [y].
  4026.  
  4027.     Scrolls the window [window] relative to the position of the cursor
  4028.     mark associated with the window. The cursor mark is not moved. The
  4029.     window is scrolled so that the cursor is [x] columns away from the
  4030.     left edge of the client area and [y] lines away from the top edge of
  4031.     the client area.
  4032.  
  4033.     If zero is specified for [x] or [y], the window is not scrolled in
  4034.     that dimension. If -1 is specified for [x] or [y], the window view
  4035.     is adjusted so that the cursor is placed in the center of the window
  4036.     for the specified dimension.
  4037.  
  4038.     Note that this call will not automatically redraw the text buffer in
  4039.     the window. Use the "windra" or "texdra" function to redraw the
  4040.     window.
  4041.                                                    Window Functions   78
  4042.  
  4043.  
  4044.     This function returns 1 if success or null if failure.
  4045.  
  4046.  
  4047.   winbar  [window]  [value]  [limit]  [options].
  4048.  
  4049.     Sets the thumb position on the horizontal or vertical scroll bars
  4050.     for the window [window]. If option "v" is not specified, then
  4051.     [limit] specifies the scroll bar range and [value] is the thumb
  4052.     position to set within that range. The following options may be
  4053.     specified:
  4054.  
  4055.       x - sets the thumb position on the horizontal scroll bar
  4056.       y - sets the thumb position on the vertical scroll bar
  4057.       d - draws the scroll bar immediately after setting the thumb.
  4058.           If this option is not specified, then "windra" must be used.
  4059.       v - [value] and [limit] specify the virtual x and y coordinates
  4060.           on the screen where the thumb should be set. The coordinates
  4061.           must be inside the scroll bar thumb ranges. This option can be
  4062.           used to allow the mouse to drag the scroll bar thumb.
  4063.  
  4064.     This function returns 1 if success or null if failure.
  4065.  
  4066.  
  4067.   winsiz  [window]  [l]  [t]  [r]  [b]  [reps]  [options]  [rel window].
  4068.  
  4069.     Changes the size and position of the window [window]. [l], [t], [r],
  4070.     and [t] specify the new window coordinates. The following [options]
  4071.     can be specified:
  4072.  
  4073.       r - coordinates are relative to the current window position
  4074.       a - coordinates are absolute (relative the "origin" - see below)
  4075.       c - coordinates specify the size of the client area, not the
  4076.           whole area of the window
  4077.       s - scrolls the window to keep the cursor mark visible, if
  4078.           necessary
  4079.  
  4080.     If option "a" is specified, the following options may also be
  4081.     specified:
  4082.  
  4083.       d - origin is at the top left corner of the screen
  4084.       w - origin is at the top left corner of the window [rel window]
  4085.       1 - origin is at the top left corner of the client area of the
  4086.           window [rel window]
  4087.       z - origin is at the virtual coordinates 0, 0
  4088.  
  4089.     If option "r" is specified, [reps] specifies the number of sizing
  4090.     repetitions (the default is 1).
  4091.                                                    Window Functions   79
  4092.  
  4093.  
  4094.     When a window is resized, all parts of the window are automatically
  4095.     redrawn ("windra" or "texdra" are not required). This function
  4096.     returns 1 if successful or null if failure.
  4097.  
  4098.  
  4099.   winmov  [window]  [l]  [t]  [reps]  [options]  [rel window].
  4100.  
  4101.     Moves the window [window] to the coordinates [l], [t]. This call is
  4102.     nearly identical to the function "winsiz" (see above), except that
  4103.     only the position of the window can be changed, not its relative
  4104.     size.
  4105.  
  4106.  
  4107.   wintil  [window]  [options]  [split thresh]  [limit].
  4108.  
  4109.     Tiles all windows on the screen, or "splits" the window [window]
  4110.     into tiles. [limit] specifies the maximum number of tiles. If
  4111.     [limit] is null or zero, then all windows will be tiled.
  4112.  
  4113.     [split thresh] specifies the number of splits that can occur in one
  4114.     direction before the next split occurs in a perpendicular direction.
  4115.     If [split thresh] is null or zero, then the default is 2.
  4116.  
  4117.     The following [options] may be specified:
  4118.  
  4119.       h - favor horizontal splits
  4120.       v - favor vertical splits
  4121.       l - tile only the window [window], and any windows which display
  4122.           the same text buffer as [window].
  4123.       b - reverse the tiling order by starting with the window on the
  4124.           bottom
  4125.  
  4126.     This function returns 1 if success or null if failure.
  4127.  
  4128.  
  4129.   qwin  [window].
  4130.  
  4131.     Returns 1 if the window [window] exists or null if it does not
  4132.     exist.
  4133.  
  4134.  
  4135.   qwinmrk  [window].
  4136.  
  4137.     Returns the cursor mark associated with the window [window], or null
  4138.     if failure.
  4139.  
  4140.  
  4141.   qwintex  [window].
  4142.  
  4143.     Returns the text buffer associated with the window [window], or null
  4144.     if failure.
  4145.                                                    Window Functions   80
  4146.  
  4147.  
  4148.   qwinx  [window]  [virtual x-coordinate].
  4149.  
  4150.     If [virtual x-coordinate] is specified:
  4151.       Returns the visible column number in the window [window] at the
  4152.       specified virtual x-coordinate, or null if failure.
  4153.  
  4154.     otherwise:
  4155.       Returns the left-most column number shown in the window [window].
  4156.  
  4157.  
  4158.   qwiny  [window]  [virtual y-coordinate].
  4159.  
  4160.     If [virtual y-coordinate] is specified:
  4161.       Returns the visible line number in the window [window] at the
  4162.       specified virtual y-coordinate, or null if failure.
  4163.  
  4164.     otherwise:
  4165.       Returns the top-most line number shown in the window [window].
  4166.  
  4167.  
  4168.   qwinbot.
  4169.  
  4170.     Returns the bottom-most window on the screen.
  4171.  
  4172.  
  4173.   qwintop  [options].
  4174.  
  4175.     Returns the top-most window on the screen. If no options are
  4176.     specified, the top-most "parent-less" window is returned. If option
  4177.     "z" is specified, the top-most window is returned, whether or not
  4178.     the window has a parent window (this is the "default" window at the
  4179.     top of the window list).
  4180.  
  4181.  
  4182.   qwinpre  [window]  [options].
  4183.  
  4184.     Returns the previous window in the window list before the window
  4185.     [window]. If option "z" is specified, then a child window may be
  4186.     returned, otherwise the closest window before [window] at the same
  4187.     level as [window] is returned. Returns null if failure.
  4188.  
  4189.  
  4190.   qwinnex  [window]  [options].
  4191.  
  4192.     Returns the next window in the window list after the window
  4193.     [window]. If option "z" is specified, then a child window may be
  4194.     returned, otherwise the closest window after [window] at the same
  4195.     level as [window] is returned. Returns null if failure.
  4196.                                                    Window Functions   81
  4197.  
  4198.  
  4199.   qwinpar  [window].
  4200.  
  4201.     Returns the parent window of [window] or null if failure.
  4202.  
  4203.  
  4204.   qwinchi  [window]  [options].
  4205.  
  4206.     Returns a child window of the window [window]. The following
  4207.     [options] may be specified:
  4208.  
  4209.       b - returns the bottom-most child window
  4210.       t - returns the top-most child window
  4211.  
  4212.     This function returns null if [window] has no child windows.
  4213.  
  4214.  
  4215.   qwinttl  [window]  [title id]  [options].
  4216.  
  4217.     Returns the title string specified by [title id] for the window
  4218.     [window]. if option "h" is specified, then this function returns the
  4219.     highlighted position within the title string (if any).
  4220.  
  4221.  
  4222.   qwincol  [window]  [element].
  4223.  
  4224.     Returns the numeric color attribute of the element [element] for the
  4225.     window [window]. See the function "wincol" for a list of one
  4226.     character element codes.
  4227.  
  4228.  
  4229.   qwinbor  [window]  [options].
  4230.  
  4231.     Returns the border thickness or border type for the window [window].
  4232.     One of the following [options] can be specified:
  4233.  
  4234.       x - returns the width of the left and right borders
  4235.       y - returns the height of the top and bottom borders
  4236.       t - returns the border type (see the "winbor" function)
  4237.  
  4238.  
  4239.   qwinp  [window]  [options].
  4240.  
  4241.     Returns the virtual coordinates, width, or height of [window]
  4242.     [options] can be any of the following:
  4243.  
  4244.       0 - returns a main window coordinate
  4245.       1 - returns a client window coordinate
  4246.                                                    Window Functions   82
  4247.  
  4248.  
  4249.       l - returns the left coordinate of the window
  4250.       t - returns the top coordinate of the window
  4251.       r - returns the right coordinate of the window
  4252.       b - returns the bottom coordinate of the window
  4253.  
  4254.       x - returns the width of the window (the width of the client area
  4255.           if option "1" is specified)
  4256.       y - returns the height of the window (the height of the client
  4257.           area if option "1" is specified)
  4258.       d - returns the height or width of the "visible" portion of the
  4259.           the window on the screen, when used with the "x" or "y"
  4260.           options above
  4261.  
  4262.  
  4263.   qwinfra  [window]  [component].
  4264.  
  4265.     Tests for the presence of the frame component [component] in the
  4266.     window [window]. See the function "winfra" for a list of one
  4267.     character component codes. This function returns a non-zero value if
  4268.     the specified [component] is present, otherwise null is returned.
  4269.  
  4270.  
  4271.   qwinrgn  [window]  [x]  [y].
  4272.  
  4273.     Returns an integer code identifying the region of the window
  4274.     [window] containing the virtual coordinates [x] and [y]. This
  4275.     function is useful for determining the window region on which a
  4276.     mouse click occurred. The following table shows the integer codes
  4277.     and the corresponding window regions.
  4278.                                                    Window Functions   83
  4279.  
  4280.  
  4281.       code         region
  4282.       ────         ──────
  4283.  
  4284.         0          [x], [y] are not in the window
  4285.         1          client area
  4286.  
  4287.         2          north border
  4288.         3          east border
  4289.  
  4290.         4          south border
  4291.         5          west border
  4292.         6          northwest border corner
  4293.         7          northeast border corner
  4294.         8          southeast border corner
  4295.         9          southwest border corner
  4296.  
  4297.        11          north title bar
  4298.        12          south title bar
  4299.        13          west title
  4300.        14          east title
  4301.  
  4302.        19          vertical & horizontal scroll bar intersection
  4303.  
  4304.        21          vert scroll bar up arrow
  4305.        22          vert scroll bar down arrow
  4306.        23          vert scroll bar page-up bar
  4307.        24          vert scroll bar page-down bar
  4308.        25          vert scroll bar thumb
  4309.  
  4310.        31          horz scroll bar left arrow
  4311.        32          horz scroll bar right arrow
  4312.        33          horz scroll bar page-left bar
  4313.        34          horz scroll bar page-right bar
  4314.        35          horz scroll bar thumb
  4315.  
  4316.        51 - 100    window title bar controls from left to right
  4317.  
  4318.        101- 200    primary menu bar items from left to right
  4319.        201- 300    menu bar 1 items from left to right
  4320.        301- 400    menu bar 2 items from left to right
  4321.        401- 500    menu bar 3 items from left to right
  4322.        501- 600    menu bar 4 items from top to bottom
  4323.  
  4324.  
  4325.   qwinbar  [window]  [limit]  [options].
  4326.  
  4327.     Returns the current position of the scroll bar thumb in the range
  4328.     0 - [limit] for the window [window]. The following [options] can be
  4329.     specified:
  4330.                                                    Window Functions   84
  4331.  
  4332.  
  4333.       x - horizontal scroll bar
  4334.       y - vertical scroll bar
  4335.  
  4336.     If no [options] are specified, the default is "y".
  4337.  
  4338.  
  4339.   qwincnt  [window].
  4340.  
  4341.     Returns the number of child windows for the parent window [window].
  4342.     If [window] is null, this function returns the total number of
  4343.     "parent-less" windows in the window list.
  4344.  
  4345.  
  4346.   qwinmen  [window]  [menu bar id]  [options]  [item].
  4347.  
  4348.     Returns information about the menu bar [menu bar id] on the window
  4349.     [window]. [item] is an integer specifying the relative position of a
  4350.     menu bar item from the beginning of the menu bar. If [item] is not
  4351.     specified, the currently highlighted menu bar item (if any) is
  4352.     assumed. The following [options] may be specified:
  4353.  
  4354.       s - returns the menu bar item string for [item]
  4355.       o - returns the offset (in columns) of [item] from the beginning
  4356.           of the menu bar
  4357.       c - returns the highlighted character for [item]
  4358.       n - returns the total number of menu bar items
  4359.  
  4360.  
  4361.   qwintic  [window]  [n].
  4362.  
  4363.     This function returns the "[n]th" one-character title bar control
  4364.     that was specified with the "wintic" function. For the left-most
  4365.     title bar control, n is "1".
  4366.                     The Aurora Macro Language and The Aurora Editor   85
  4367.  
  4368.  
  4369.   A-1  The Aurora Macro Language and The Aurora Editor
  4370.   ────────────────────────────────────────────────────
  4371.  
  4372.   This section describes some aspects of The Aurora Editor from the
  4373.   point of view of The Aurora Macro Language.
  4374.  
  4375.  
  4376.   The Aurora Editor is itself a compiled macro language program
  4377.   contained in the file A.X. The programs A.EXE and A3.EXE are macro
  4378.   language interpreters which execute A.X.
  4379.  
  4380.   The main macro source file for A.X is the file A.A. The file A.A does
  4381.   very little except to include ACFG.A (configuration settings), AMEN.A
  4382.   (menu definitions), ALIB.X, (compiled editor library functions),
  4383.   AKBD.A (keyboard and mouse definitions), and ATRN.A (text translation
  4384.   definitions). When A.A is compiled, all of the above files are
  4385.   combined and A.X is generated.
  4386.  
  4387.   When The Aurora Editor is initially started from the DOS command line,
  4388.   A.X is executed and the following things happen:
  4389.  
  4390.   - The configuration settings (in ACFG.A) are placed in the object
  4391.     "prf" via the "set" native function.
  4392.  
  4393.   - The editor menus (in AMEN.A) are created via the "winmen" and
  4394.     "texmen" native functions.
  4395.  
  4396.   - All editor library functions are included from the file ALIB.X.
  4397.     Library functions are the editor commands described in The Aurora
  4398.     Editor Users Guide.
  4399.  
  4400.   - The keyboard and mouse definition functions (in AKBD.A) are added to
  4401.     event handler objects such as "edit", "fmgr", "prompt", etc.
  4402.  
  4403.   - The text translation table (in ATRN.A) is created.
  4404.  
  4405.   - The history file (A.HIS) and saved key macros are loaded (if
  4406.     configured).
  4407.  
  4408.   - Edit windows and/or File Manager windows are created, depending
  4409.     on what was entered on the DOS command line or remembered from
  4410.     a previous edit session.
  4411.  
  4412.  
  4413.   It is important to keep the following things in mind when writing your
  4414.   own macro commands for The Aurora Editor:
  4415.  
  4416.   1) The top-most window displayed on the screen is always the "default"
  4417.      window, and can be referenced with a null window name in any of the
  4418.      "win" native functions.
  4419.                     The Aurora Macro Language and The Aurora Editor   86
  4420.  
  4421.  
  4422.      Likewise, the text buffer and cursor mark displayed in the top-most
  4423.      window are the "default" text buffer and the "default" mark. They
  4424.      can also be referenced with null text buffer and null mark names in
  4425.      the "tex" and "mrk" native functions.
  4426.  
  4427.   2) The file name displayed in an Edit window is the first title (title
  4428.      id "1") for the window, and can be accessed with the "qwinttl"
  4429.      function.
  4430.  
  4431.   2) When the user creates a marked block for use with the "block"
  4432.      functions (such as copy, move, delete, etc.), that mark can be
  4433.      referenced with the mark name "*". This mark cannot be referenced
  4434.      with a null mark name, since that would refer to the cursor mark.
  4435.  
  4436.   3) The Aurora Editor uses timer id's 6, 7, 8, and 9. This leaves timer
  4437.      id's 0 through 5 available.
  4438.  
  4439.   4) The Aurora Editor creates the following "event" objects:
  4440.  
  4441.        "edit"   - edit windows
  4442.        "fmgr"   - file manager windows
  4443.        "menu"   - menu windows
  4444.        "prompt" - prompt windows and edit fields
  4445.  
  4446.      The Aurora Editor sets the current event object based on the window
  4447.      type of the top-most window. For example, if the top-most window is
  4448.      a File Manager window, then the current event object is "fmgr".
  4449.  
  4450.      Other objects used by The Aurora Editor are:
  4451.  
  4452.        "a"          - all windows
  4453.        "mon"        - all windows
  4454.        "win"        - movable or sizable windows
  4455.        "edit-fmgr"  - edit and file manger windows
  4456.        "dlg"        - dialog boxes
  4457.        "trn"        - text translation object (default)
  4458.  
  4459.